virtualenvwrapper - IOError:[Errno 13]权限被拒绝

时间:2014-05-21 03:39:12

标签: python virtualenv virtualenvwrapper

我正在尝试在新的Ubuntu 14.04安装上安装virtualenvwrapper。我按照here步骤将这些行添加到我的.bashrc:

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

我在尝试source ~/.bashrc时收到以下错误消息:

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 217, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 131, in main
    run_hooks(hook, options, args)
  File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 157, in run_hooks
    hook_mgr = ExtensionManager(namespace)
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 92, in __init__
    verify_requirements)
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 155, in _load_plugins
    for ep in self._find_entry_points(self.namespace):
  File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 148, in _find_entry_points
    eps = list(pkg_resources.iter_entry_points(namespace))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 515, in iter_entry_points
    entries = dist.get_entry_map(group)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2371, in get_entry_map
    self._get_metadata('entry_points.txt'), self
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2155, in parse_map
    for group, lines in data:
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2715, in split_sections
    for line in yield_lines(s):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in yield_lines
    for ss in strs:
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2305, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1369, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1361, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1470, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/numpydoc-0.4-py2.7.egg/EGG-INFO/entry_points.txt'
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.

执行source /usr/local/bin/virtualenvwrapper.sh时会发生这种情况。

有什么想法吗?感谢。

编辑:虽然我收到此错误消息,但似乎我的virtualenv有点工作。我能够创建新的env甚至workon。但是我输入的每个命令,我都得到了上面的IOError。

1 个答案:

答案 0 :(得分:2)

固定。我刚刚卸载了令人讨厌的numpy doc包:

sudo pip uninstall numpydoc