Search code examples
pythonvirtualenvvirtualenvwrapper

virtualenvwrapper - IOError: [Errno 13] Permission denied


I'm trying to install virtualenvwrapper on a fresh Ubuntu 14.04 installation. I followed the steps here and added these lines to my .bashrc:

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

I get the following error message when I try and 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.

This happens when source /usr/local/bin/virtualenvwrapper.sh is executed.

Any ideas? Thanks.

EDIT: Although I am getting this error message, it seems my virtualenv is kind of working. I am able to create new env and even workon them. But every command I ttype, I get the IOError above.


Solution

  • Fixed. I just uninstalled the offending numpy doc package:

    sudo pip uninstall numpydoc