我想用pip将Eric安装到用pyenv设置的Linux环境中。这个程序有效,但我看不见我的包裹。我看不出是什么问题。
以下是我所做的
pyenv virtualenv 3.6.9 default pyenv activate default pip install numpy
现在启动Eric,使用import numpy行启动一个程序,您将得到一个ModuleFileNotFound错误。没有外部模块的程序可以正常工作。在命令行中,PyPI页面将不会显示与pip list相同的“默认”列表。
有什么问题吗?
发布于 2020-05-19 05:42:50
Eric是Python的一个很好的、完全开放的源代码环境。它有令人震惊的舒适和广泛配置的功能,并提供了一个完美的工作流程,同时相当直观地使用。真是个十足的IDE。虽然我没有使用QT (它提供了更多的集成特性),但我真的很高兴能够解决我遇到的这个主要的节目阻止器,这就是pyenv的问题。我找到了解决问题的办法,现在可以回答自己的问题了。也许它对其他人有用。
- The "Manager" - Eric only recognizes automatically on virtualevn. This is the one where eric was installed. This is named , but you may change the name. I change it to "eric" in my installations to avod confusion. There is one setting in the related Edit Dialog saying "Global Environment". For the virtualenv where Eric is installed this is checked and works, even though its actually not the global (=system) environment. Maybe the change that in versions after 20.5, because it would be more logical if that checkbox would be unchecked.
- Use the Add button to enter data of other virtual environments you have on your system. It does matter which folders you enter as it might not see your packets when you entered the wrong folder (e.g. wrong folder for the "Interpreter"). Following is what is correct for a standard pyenv virtualenv created with "pyenv virtualevn 2.8.18 pythonLegacy" in Ubuntu 18.04. When you point the Interpreter path to the actual python installation Eric will not see your packages. It only works if you point to the symlink as in the example. Logical Name pythonLegacy Directory /home/user/.pyenv/versions/pythonLegacy/lib/python2.7/site-packages Python Interpreter /home/user/.pyenv/versions/pythonLegacy/bin/python2.7 All options unchecked PATH Prefix <empty> - if you add the OS system environment you must check the "Global Environment" checkbox. It will work as expected.
- The "Configuration" - the name is misleading, because this dialog allows you to create a new virtual env from within Eric IDE.
- Please be careful what you enter, because it will write (or overwrite) data in your pyenv folder. As there is not documentation about this dialog, its a good idea to backup your " ~/.pyenv" (or whatever) pyenv home folder before testing what settings it needs.
PS:我希望更多的人开始使用这个,所以默认的Ubuntu存储库将开始升级这个包。目前,它不在维护的范围之内。
https://stackoverflow.com/questions/61849960
复制相似问题