aznfy
V2EX  ›  Python

请问怎样用 pyenv+virtualenv 将虚拟环境创建到工程项目目录下而不是默认的.pyenv/versions/目录下

By aznfy at 2017 年 3 月 3 日 · 4176 次点击
5 条回复  •  2017-03-07 22:54:35 +08:00
billyzs
   1
billyzs  
   2017 年 3 月 3 日
$ pip install virtualenvwrapper
$ export WORKON_HOME=~/.envs
$ mkvirtualenv my_env
menduo
   2
menduo  
   2017 年 3 月 7 日
$ pyenv shell 3.5.0 && pip install virtualenv && virtualenv venv && source venv/bin/activate
aznfy
   3
aznfy  
OP
   2017 年 3 月 7 日
@menduo 这也没法建到工程目录下面吧。。。
aznfy
   4
aznfy  
OP
   2017 年 3 月 7 日
@menduo 不好意思!之前试错了!确实可以!感谢!🙏
menduo
   5
menduo  
   2017 年 3 月 7 日
@aznfy YOU ARE VERY WELCOME!!! 😀😀😀
推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
© 2026 V2EX · 31ms · 3.9.8.5