我使用 pyenv 来控制 2.7.15 和 3.6.5 之间的版本。在这两种情况下,我都必须使用 pip install numpy 才能成功导入 numpy。所以我认为在将 numpy 用于不同版本的 python 时存在一些重复,因为 numpy 可以同时支持 python2 和 python3。
使用 pyenv 时,有什么办法可以在不同版本的 python 之间共享 numpy 和 jupyter 等第三方库吗?
最佳答案
来自Virtualenv doc :
In all these cases,
virtualenv
can help you. It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either).
您正在使用pyenv
,但它是相同的。您不能在不同的环境之间共享库,因为每个环境都是完全独立和隔离的
关于python - 使用pyenv时,不同版本的python是否可以共享相同的第三方库,例如numpy 1.15.1和jupyter 1.0.1?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52207621/