Virtualenv: Error running virtualenv venv --python python3 on fresh yosemite install

Created on 20 Oct 2015  ·  4Comments  ·  Source: pypa/virtualenv

Steps to reproduce::

brew install python python3
pip install virtualenv
virtualenv venv --python python3

This is the stacktrace::

Running virtualenv with interpreter /usr/local/bin/python3
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 14, in <module>
    import shutil
  File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shutil.py", line 11, in <module>
    import fnmatch
  File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/fnmatch.py", line 15, in <module>
    import functools
  File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/functools.py", line 21, in <module>
    from collections import namedtuple
  File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/collections/__init__.py", line 17, in <module>
     from reprlib import recursive_repr as _recursive_repr
  File "/usr/local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

Most helpful comment

Upgrading to virtualenv==15.0.1 solved the problem for on Ubuntu.

All 4 comments

This should be fixed by https://github.com/pypa/virtualenv/pull/805 which has not yet made it to stable.

Also, I don't believe that's truly fresh, otherwise you wouldn't have reprlib installed.

A "workaround": pip install --upgrade virtualenv==12.0.2

or

pip install --upgrade https://github.com/pypa/virtualenv/archive/develop.zip

Reference: http://stackoverflow.com/a/33074714/788022

Upgrading to virtualenv==15.0.1 solved the problem for on Ubuntu.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings