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
SimbaPeng
V2EX  ›  Python

macOs 下 pipenv 创建的虚拟环境 Python ,在全局环境的 Python 升级之后就报错了?

  •  
  •   SimbaPeng · 2018-04-19 18:46:20 +08:00 · 2121 次点击
    这是一个创建于 2189 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用 pipenv 创建了一个虚拟环境,前段时间还用得好好的,最近用 homebrew 升级了下软件,刚好 python 也从 3.6.4 升级到了 3.6.5,之后就发现 pipenv 创建的虚拟环境的 python 不能用了。报错如下:

    dyld: Library not loaded: @executable_path/../.Python Referenced from: /Users/simbapeng/.local/share/virtualenvs/img_process-PtKFY7J-/bin/python Reason: image not found [1] 50112 abort img_process-PtKFY7J-/bin/python --version

    1 条回复    2018-04-20 07:52:05 +08:00
    shootsoft
        1
    shootsoft  
       2018-04-20 07:52:05 +08:00 via iPhone
    如果我没记错的话,虚拟环境默认是 softlink,虚拟环境中只是把依赖的包装到了当前目录下。可执行文件仍然是系统下的那个。你看看创建虚拟环境的时候是不是有参数控制。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3133 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 14:39 · PVG 22:39 · LAX 07:39 · JFK 10:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.