2

I have a problem working with virtualenv on a MAC...this is what I do:

Tester-MacBook-Pro:myproject tester$ virtualenv foobar
New python executable in /Users/tester/Documents/myproject/foobar/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /Users/tester/...ct/foobar/bin/python - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/Users/tester/anaconda/lib/python2.7/tempfile.py", line 32, in <module>
    import io as _io
  File "/Users/tester/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/tester/Documents/myproject/foobar/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/tester/Documents/myproject/foobar/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Users/tester/Documents/myproject/foobar/lib/python2.7/lib-dynload/_io.so
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/Users/tester/anaconda/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/Users/tester/anaconda/lib/python2.7/site-packages/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/Users/tester/anaconda/lib/python2.7/site-packages/virtualenv.py", line 945, in create_environment
    download=download,
  File "/Users/tester/anaconda/lib/python2.7/site-packages/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/Users/tester/anaconda/lib/python2.7/site-packages/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/tester/...ct/foobar/bin/python - setuptools pip wheel failed with error code 1
1
  • root cause is ImportError: dlopen(/Users/tester/Documents/myproject/foobar/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder. Good luck with that. Are you stuck with 2.7? or could you try more recent versions like 3.5? Commented Dec 30, 2016 at 20:59

1 Answer 1

1

I just encountered the same problem.

It turns out I was using python-2.7.13 and downgrading to 2.7.10 solved that issue.

If you are using Anaconda, you can do that by running:
$ conda install python=2.7.10

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.