V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
aznfy
V2EX  ›  Python

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

  •  
  •   aznfy · 2017-03-03 11:02:09 +08:00 · 2879 次点击
    这是一个创建于 2583 天前的主题,其中的信息可能已经有所发展或是发生改变。
    5 条回复    2017-03-07 22:54:35 +08:00
    billyzs
        1
    billyzs  
       2017-03-03 13:21:33 +08:00
    $ pip install virtualenvwrapper
    $ export WORKON_HOME=~/.envs
    $ mkvirtualenv my_env
    menduo
        2
    menduo  
       2017-03-07 22:12:19 +08:00
    $ pyenv shell 3.5.0 && pip install virtualenv && virtualenv venv && source venv/bin/activate
    aznfy
        3
    aznfy  
    OP
       2017-03-07 22:38:23 +08:00
    @menduo 这也没法建到工程目录下面吧。。。
    aznfy
        4
    aznfy  
    OP
       2017-03-07 22:40:35 +08:00
    @menduo 不好意思!之前试错了!确实可以!感谢!🙏
    menduo
        5
    menduo  
       2017-03-07 22:54:35 +08:00
    @aznfy YOU ARE VERY WELCOME!!! 😀😀😀
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5190 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 09:27 · PVG 17:27 · LAX 02:27 · JFK 05:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.