Error when setting up virtualenv with Python 3 -


i'm attempting create virtualenv (using virtualenvwrapper) python 3 default interpreter, keep receiving same error after un/reinstalling python 3, virtualenv, , virtualenvwrapper several times.

$ mkvirtualenv -p /usr/local/bin/python3 test-env running virtualenv interpreter /usr/local/bin/python3 traceback (most recent call last):   file "/library/python/2.7/site-packages/virtualenv.py", line 23, in <module>     import subprocess   file "/usr/local/cellar/python3/3.4.3/frameworks/python.framework/versions/3.4/lib/python3.4/subprocess.py", line 405, in <module>     import _posixsubprocess importerror: dlopen(/library/python/2.7/site-packages/_posixsubprocess.so, 2): symbol not found: _pystring_asstring   referenced from: /library/python/2.7/site-packages/_posixsubprocess.so   expected in: flat namespace  in /library/python/2.7/site-packages/_posixsubprocess.so 

i have both python 2 (prepackaged version os x) , python 3 (via brew install python3) installed.

i can create virtualenvs fine using of python 2 binaries.

i had exact same error, , in case able solve following steps:

$ brew unlink python3 $ brew link --overwrite python3 $ unset pythonpath 

after that, virtualenv worked expected.