[英]Problems setting up virtualenv and virtualenvwrapper on Raspberry Pi 3
I'm following a tutorial which seems very comprehensive:我正在学习一个看起来非常全面的教程:
https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/ https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/
but receiving an error when trying to load ~/.profile after these changes:但是在这些更改后尝试加载 ~/.profile 时收到错误:
# virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
The entire output after running运行后的整个输出
source ~/.profile
is:是:
pi@SamPi:~ $ source ~/.profile
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 223, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 132, in main
run_hooks(hook, options, args)
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 161, in run_hooks
hook_mgr = ExtensionManager(namespace)
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 106, in __init__
verify_requirements)
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 188, in _load_plugins
for ep in self.list_entry_points():
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 177, in list_entry_points
eps = list(pkg_resources.iter_entry_points(self.namespace))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 521, in iter_entry_points
entries = dist.get_entry_map(group)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2484, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2261, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
"check that virtualenvwrapper has been installed": So reinstall the virtualenvwrapper. “检查 virtualenvwrapper 是否已安装”:所以重新安装 virtualenvwrapper。 Open e new terminal and start from this line:
打开新终端并从这一行开始:
$ sudo pip install virtualenv virtualenvwrapper $ sudo pip install virtualenv virtualenvwrapper
我有同样的问题,我已经将 virtualenv 和 virtualenvwrapper 安装到 python 2. 指定pip3
为我解决了问题。
sudo pip3 install virtualenv virtualenvwrapper
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.