Skip to content

Instantly share code, notes, and snippets.

@Teemu
Last active August 29, 2015 14:26
Show Gist options
  • Save Teemu/e9272b165edc85e182fc to your computer and use it in GitHub Desktop.
Save Teemu/e9272b165edc85e182fc to your computer and use it in GitHub Desktop.
Creating virtualenv with Python3 when everything fails
pip3 install virtualenv
python3.4 `which virtualenv` --python=`which python3.4` --no-site-packages env
mv env ~/.virtualenvs/
@Teemu
Copy link
Author

Teemu commented Jul 29, 2015

Credits to pypa/virtualenv#625

@Teemu
Copy link
Author

Teemu commented Jul 29, 2015

And the error if somebody is trying to find this with Google:

Running virtualenv with interpreter /usr/local/bin/python3.4
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.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shutil.py", line 11, in <module>
    import fnmatch
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/fnmatch.py", line 15, in <module>
    import functools
  File "/usr/local/Cellar/python3/3.4.2_1/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.2_1/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.py", line 3, in <module>
    from repr import *
ImportError: No module named 'repr'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment