python 2.7.10-0 fails to create virtualenv with Symbol not found: __PyErr_ReplaceException #1367

Closed
cjw296 opened this Issue Jun 9, 2015 · 75 comments

Comments

Projects
None yet
@cjw296

cjw296 commented Jun 9, 2015

This morning I wanted to create a virtualenv on Mac OS X where my default python is now anaconda, so I needed to install virtualenv:

$ conda install virtualenv
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment /Users/cwithers/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.2.1            |           py27_0          21 KB
    python-2.7.10              |                0        11.4 MB
    requests-2.7.0             |           py27_0         594 KB
    setuptools-17.0            |           py27_0         341 KB
    conda-3.13.0               |           py27_0         168 KB
    pip-7.0.3                  |           py27_0         1.4 MB
    virtualenv-13.0.1          |           py27_0         1.6 MB
    ------------------------------------------------------------
                                           Total:        15.5 MB

The following NEW packages will be INSTALLED:

    virtualenv: 13.0.1-py27_0

The following packages will be UPDATED:

    conda:      3.11.0-py27_0 --> 3.13.0-py27_0
    conda-env:  2.1.4-py27_0  --> 2.2.1-py27_0 
    pip:        6.1.1-py27_0  --> 7.0.3-py27_0 
    python:     2.7.9-1       --> 2.7.10-0     
    requests:   2.6.2-py27_0  --> 2.7.0-py27_0 
    setuptools: 15.1-py27_1   --> 17.0-py27_0  

However, now when I try to create the env I get this error:

$ virtualenv ve
New python executable in ve/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /Users/cwithers/vcs/x/ve/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/cwithers/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/Users/cwithers/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 15, in <module>
  File "/Users/cwithers/anaconda/lib/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/Users/cwithers/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/cwithers/vcs/x/ve/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyErr_ReplaceException
  Referenced from: /Users/cwithers/vcs/x/ve/lib/python2.7/lib-dynload/_io.so
  Expected in: dynamic lookup

Downgrading to Python 2.7.9-1 made this problem go away.
It looks like I'm not the only one experiencing this:

http://stackoverflow.com/questions/30674338/upgrade-to-python-2-7-10-target-wsgi-script-cannot-be-loaded-as-python-module

@asmeurer

This comment has been minimized.

Show comment
Hide comment
@asmeurer

asmeurer Jun 19, 2015

Contributor

I can reproduce this. @ilanschnell we should probably see if we can fix this before the release.

Contributor

asmeurer commented Jun 19, 2015

I can reproduce this. @ilanschnell we should probably see if we can fix this before the release.

@ggonzale

This comment has been minimized.

Show comment
Hide comment
@ggonzale

ggonzale Jun 23, 2015

I am experiencing a similar error with conda after installing mayavi 4.3 from a fresh Anaconda 2.2 installation on Mac OsX yosemite. It might be because of the upgrade from python 2.7.9 to 2.7.10.

German:conda-recipes-master predout$ conda install mayavi=4.3.0
Fetching package metadata: ....
Solving package specifications: ...............
Package plan for installation in environment /Users/predout/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    qt-4.8.6                   |                3        39.0 MB
    numpy-1.7.1                |           py27_2         2.8 MB
    python-2.7.10              |                0        11.4 MB
    shiboken-1.1.2             |           py27_0         875 KB
    traits-4.4.0               |           py27_0         374 KB
    vtk-5.10.1                 |           py27_0        28.8 MB
    pyface-4.4.0               |           py27_0         693 KB
    pyside-1.1.2               |           py27_1         5.2 MB
    traitsui-4.4.0             |           py27_0         837 KB
    apptools-4.2.0             |           py27_1         271 KB
    envisage-4.4.0             |           py27_0         266 KB
    mayavi-4.3.0               |       np17py27_4        10.0 MB
    ------------------------------------------------------------
                                           Total:       100.3 MB

The following NEW packages will be INSTALLED:

    apptools: 4.2.0-py27_1    
    envisage: 4.4.0-py27_0    
    mayavi:   4.3.0-np17py27_4
    pyface:   4.4.0-py27_0    
    pyside:   1.1.2-py27_1    
    shiboken: 1.1.2-py27_0    
    traits:   4.4.0-py27_0    
    traitsui: 4.4.0-py27_0    
    vtk:      5.10.1-py27_0   

The following packages will be UPDATED:

    freetype: 2.5.2-0      --> 2.5.2-2         
    libpng:   1.5.13-1     --> 1.6.17-0        
    python:   2.7.9-1      --> 2.7.10-0        
    qt:       4.8.6-0      --> 4.8.6-3         

The following packages will be DOWNGRADED:

    numpy:    1.9.2-py27_0 --> 1.7.1-py27_2    

Proceed ([y]/n)? y

Fetching packages ...
qt-4.8.6-3.tar 100% |#######################################################################| Time: 0:00:04   8.33 MB/s
numpy-1.7.1-py 100% |#######################################################################| Time: 0:00:00   4.45 MB/s
python-2.7.10- 100% |#######################################################################| Time: 0:00:02   5.79 MB/s
shiboken-1.1.2 100% |#######################################################################| Time: 0:00:00   3.17 MB/s
traits-4.4.0-p 100% |#######################################################################| Time: 0:00:00   1.52 MB/s
vtk-5.10.1-py2 100% |#######################################################################| Time: 0:00:03   9.53 MB/s
pyface-4.4.0-p 100% |#######################################################################| Time: 0:00:00   2.25 MB/s
pyside-1.1.2-p 100% |#######################################################################| Time: 0:00:01   5.09 MB/s
traitsui-4.4.0 100% |#######################################################################| Time: 0:00:00   2.99 MB/s
apptools-4.2.0 100% |#######################################################################| Time: 0:00:00   1.59 MB/s
envisage-4.4.0 100% |#######################################################################| Time: 0:00:00   1.51 MB/s
mayavi-4.3.0-n 100% |#######################################################################| Time: 0:00:01   8.59 MB/s
Extracting packages ...
    [                    ]|                                                                                        [      COMPLETE      ]|##########################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|##########################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|##########################################################################################| 100%

And after when trying to use conda again:

German:conda-recipes-master predout$ conda
Traceback (most recent call last):
  File "/Users/predout/anaconda/bin/conda", line 5, in <module>
    sys.exit(main())
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 106, in main
    from conda.cli import conda_argparse
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 15, in <module>
    from conda.cli import common
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/common.py", line 13, in <module>
    import conda.config as config
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/config.py", line 16, in <module>
    from conda.compat import urlparse
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/compat.py", line 64, in <module>
    from pipes import quote
  File "/Users/predout/anaconda/lib/python2.7/pipes.py", line 62, in <module>
    import tempfile
  File "/Users/predout/anaconda/lib/python2.7/tempfile.py", line 32, in <module>
    import io as _io
  File "/Users/predout/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/predout/anaconda/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyErr_ReplaceException
  Referenced from: /Users/predout/anaconda/lib/python2.7/lib-dynload/_io.so
  Expected in: dynamic lookup

I am experiencing a similar error with conda after installing mayavi 4.3 from a fresh Anaconda 2.2 installation on Mac OsX yosemite. It might be because of the upgrade from python 2.7.9 to 2.7.10.

German:conda-recipes-master predout$ conda install mayavi=4.3.0
Fetching package metadata: ....
Solving package specifications: ...............
Package plan for installation in environment /Users/predout/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    qt-4.8.6                   |                3        39.0 MB
    numpy-1.7.1                |           py27_2         2.8 MB
    python-2.7.10              |                0        11.4 MB
    shiboken-1.1.2             |           py27_0         875 KB
    traits-4.4.0               |           py27_0         374 KB
    vtk-5.10.1                 |           py27_0        28.8 MB
    pyface-4.4.0               |           py27_0         693 KB
    pyside-1.1.2               |           py27_1         5.2 MB
    traitsui-4.4.0             |           py27_0         837 KB
    apptools-4.2.0             |           py27_1         271 KB
    envisage-4.4.0             |           py27_0         266 KB
    mayavi-4.3.0               |       np17py27_4        10.0 MB
    ------------------------------------------------------------
                                           Total:       100.3 MB

The following NEW packages will be INSTALLED:

    apptools: 4.2.0-py27_1    
    envisage: 4.4.0-py27_0    
    mayavi:   4.3.0-np17py27_4
    pyface:   4.4.0-py27_0    
    pyside:   1.1.2-py27_1    
    shiboken: 1.1.2-py27_0    
    traits:   4.4.0-py27_0    
    traitsui: 4.4.0-py27_0    
    vtk:      5.10.1-py27_0   

The following packages will be UPDATED:

    freetype: 2.5.2-0      --> 2.5.2-2         
    libpng:   1.5.13-1     --> 1.6.17-0        
    python:   2.7.9-1      --> 2.7.10-0        
    qt:       4.8.6-0      --> 4.8.6-3         

The following packages will be DOWNGRADED:

    numpy:    1.9.2-py27_0 --> 1.7.1-py27_2    

Proceed ([y]/n)? y

Fetching packages ...
qt-4.8.6-3.tar 100% |#######################################################################| Time: 0:00:04   8.33 MB/s
numpy-1.7.1-py 100% |#######################################################################| Time: 0:00:00   4.45 MB/s
python-2.7.10- 100% |#######################################################################| Time: 0:00:02   5.79 MB/s
shiboken-1.1.2 100% |#######################################################################| Time: 0:00:00   3.17 MB/s
traits-4.4.0-p 100% |#######################################################################| Time: 0:00:00   1.52 MB/s
vtk-5.10.1-py2 100% |#######################################################################| Time: 0:00:03   9.53 MB/s
pyface-4.4.0-p 100% |#######################################################################| Time: 0:00:00   2.25 MB/s
pyside-1.1.2-p 100% |#######################################################################| Time: 0:00:01   5.09 MB/s
traitsui-4.4.0 100% |#######################################################################| Time: 0:00:00   2.99 MB/s
apptools-4.2.0 100% |#######################################################################| Time: 0:00:00   1.59 MB/s
envisage-4.4.0 100% |#######################################################################| Time: 0:00:00   1.51 MB/s
mayavi-4.3.0-n 100% |#######################################################################| Time: 0:00:01   8.59 MB/s
Extracting packages ...
    [                    ]|                                                                                        [      COMPLETE      ]|##########################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|##########################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|##########################################################################################| 100%

And after when trying to use conda again:

German:conda-recipes-master predout$ conda
Traceback (most recent call last):
  File "/Users/predout/anaconda/bin/conda", line 5, in <module>
    sys.exit(main())
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 106, in main
    from conda.cli import conda_argparse
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 15, in <module>
    from conda.cli import common
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/cli/common.py", line 13, in <module>
    import conda.config as config
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/config.py", line 16, in <module>
    from conda.compat import urlparse
  File "/Users/predout/anaconda/lib/python2.7/site-packages/conda/compat.py", line 64, in <module>
    from pipes import quote
  File "/Users/predout/anaconda/lib/python2.7/pipes.py", line 62, in <module>
    import tempfile
  File "/Users/predout/anaconda/lib/python2.7/tempfile.py", line 32, in <module>
    import io as _io
  File "/Users/predout/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/predout/anaconda/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyErr_ReplaceException
  Referenced from: /Users/predout/anaconda/lib/python2.7/lib-dynload/_io.so
  Expected in: dynamic lookup
@ilanschnell

This comment has been minimized.

Show comment
Hide comment
@ilanschnell

ilanschnell Jun 23, 2015

Member

Importing _io works fine for me (on OSX 10.7, and Python 2.7.10). It is not clear to me where the problem lies, i.e. whether this is a build problem or an upstream problem. Nothing has really changed with respect to the Python 2.7.10 update in how we build Python.

Member

ilanschnell commented Jun 23, 2015

Importing _io works fine for me (on OSX 10.7, and Python 2.7.10). It is not clear to me where the problem lies, i.e. whether this is a build problem or an upstream problem. Nothing has really changed with respect to the Python 2.7.10 update in how we build Python.

@asmeurer

This comment has been minimized.

Show comment
Hide comment
@asmeurer

asmeurer Jun 23, 2015

Contributor

It works for me too, except when trying to create a virtualenv. I'm not sure what causes it, since the virtualenv seems to just put a symlink to the lib-dynload.

Contributor

asmeurer commented Jun 23, 2015

It works for me too, except when trying to create a virtualenv. I'm not sure what causes it, since the virtualenv seems to just put a symlink to the lib-dynload.

@ntfrgl ntfrgl referenced this issue in pik-copan/pyunicorn Jun 30, 2015

Merged

inital commit for the Event Synchronization class #61

@pjbull

This comment has been minimized.

Show comment
Hide comment
@pjbull

pjbull Jul 5, 2015

If anyone is seeing this problem and is linked here from stack overflow, I worked around it by moving back to Python 2.7.9:

conda install python=2.7.9

pjbull commented Jul 5, 2015

If anyone is seeing this problem and is linked here from stack overflow, I worked around it by moving back to Python 2.7.9:

conda install python=2.7.9

@ntfrgl

This comment has been minimized.

Show comment
Hide comment
@ntfrgl

ntfrgl Jul 6, 2015

Which is the exact Python version you use? I still get the same error with:

conda:      3.14.1-py27_0
conda-env:  2.2.3-py27_0
pip:        7.0.3-py27_0
python:     2.7.9-3
setuptools: 17.1.1-py27_0

ntfrgl commented Jul 6, 2015

Which is the exact Python version you use? I still get the same error with:

conda:      3.14.1-py27_0
conda-env:  2.2.3-py27_0
pip:        7.0.3-py27_0
python:     2.7.9-3
setuptools: 17.1.1-py27_0
@kyleabeauchamp

This comment has been minimized.

Show comment
Hide comment
@kyleabeauchamp

kyleabeauchamp Jul 7, 2015

I see the same problem on linux, and the python=2.7.9 workaround does not work for me (I get python2.7/lib-dynload/_io.so: undefined symbol: _PyLong_AsInt).

I see the same problem on linux, and the python=2.7.9 workaround does not work for me (I get python2.7/lib-dynload/_io.so: undefined symbol: _PyLong_AsInt).

@kyleabeauchamp

This comment has been minimized.

Show comment
Hide comment
@kyleabeauchamp

kyleabeauchamp Jul 7, 2015

As expected, there is some unholy business with my system and anaconda python executables:

ldd ~/anaconda/env/bin/python
[...]
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0
ldd ~/anaconda/bin/python
[..]
libpython2.7.so.1.0 => ~/anaconda/bin/../lib/libpython2.7.so.1.0

As expected, there is some unholy business with my system and anaconda python executables:

ldd ~/anaconda/env/bin/python
[...]
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0
ldd ~/anaconda/bin/python
[..]
libpython2.7.so.1.0 => ~/anaconda/bin/../lib/libpython2.7.so.1.0
@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Jul 7, 2015

@kyleabeauchamp - it sounds like you have a separate issue, so please log it separately. This one is specifically for "Symbol not found: __PyErr_ReplaceException" on Mac OS X when using Python 2.7.10-0

cjw296 commented Jul 7, 2015

@kyleabeauchamp - it sounds like you have a separate issue, so please log it separately. This one is specifically for "Symbol not found: __PyErr_ReplaceException" on Mac OS X when using Python 2.7.10-0

@kyleabeauchamp

This comment has been minimized.

Show comment
Hide comment
@kyleabeauchamp

kyleabeauchamp Jul 8, 2015

I think I was a bit unclear. I saw exactly the same error (__PyErr_ReplaceException) on linux with py2.7.10.

The other error message I reported was only observed when I attempted the workaround (py2.7.9) described above.

I think I was a bit unclear. I saw exactly the same error (__PyErr_ReplaceException) on linux with py2.7.10.

The other error message I reported was only observed when I attempted the workaround (py2.7.9) described above.

@ntfrgl

This comment has been minimized.

Show comment
Hide comment
@ntfrgl

ntfrgl Jul 30, 2015

Any progress on this?

ntfrgl commented Jul 30, 2015

Any progress on this?

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Aug 6, 2015

Member

I'm on OSX, and can confirm the conda install python=2.7.9 downgrade "fixes" the issue.

Member

kalefranz commented Aug 6, 2015

I'm on OSX, and can confirm the conda install python=2.7.9 downgrade "fixes" the issue.

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Aug 12, 2015

A couple of months on, any news on when a fix will land @ilanschnell?

cjw296 commented Aug 12, 2015

A couple of months on, any news on when a fix will land @ilanschnell?

@goretkin

This comment has been minimized.

Show comment
Hide comment
@goretkin

goretkin Aug 12, 2015

I had python 2.7.10 on conda, and started experiencing this issue when I added /System/Library/Frameworks/Python.framework/Versions/2.7/lib to the DYLD_LIBRARY_PATH environment variable.

Downgrading worked for me too.

I had python 2.7.10 on conda, and started experiencing this issue when I added /System/Library/Frameworks/Python.framework/Versions/2.7/lib to the DYLD_LIBRARY_PATH environment variable.

Downgrading worked for me too.

@burkesquires

This comment has been minimized.

Show comment
Hide comment
@burkesquires

burkesquires Aug 13, 2015

Downgrading fixed the problem for me as well.

Downgrading fixed the problem for me as well.

@katyhuff

This comment has been minimized.

Show comment
Hide comment
@katyhuff

katyhuff Sep 3, 2015

Downgrading also fixed this problem for me (I actually didn't notice this problem until it kept vim pymode from reporting any linter errors. go figure.)

katyhuff commented Sep 3, 2015

Downgrading also fixed this problem for me (I actually didn't notice this problem until it kept vim pymode from reporting any linter errors. go figure.)

@FranGhelfi

This comment has been minimized.

Show comment
Hide comment
@FranGhelfi

FranGhelfi Sep 23, 2015

I ran the "conda install python=2.7.9", it says it installed ok. But when I do "python --version" I still see 2.7.10.

What else I should do?

I ran the "conda install python=2.7.9", it says it installed ok. But when I do "python --version" I still see 2.7.10.

What else I should do?

@murphysj murphysj referenced this issue in EarthSystemCoG/COG Nov 24, 2015

Open

Test cog with Python 2.7.10 #1182

@jenisys

This comment has been minimized.

Show comment
Hide comment
@jenisys

jenisys Dec 21, 2015

This is probably a condo/virtualenv co-issue.
I have the same problems with Python 2.7.11 and Python 3.5.1 and condo 3.18.9, pip 7.1.2, virtualenv 13.1.2. With Python 3.5.1, virtual environment creation fails with "virtualenv" and "pyvenv" (with a slightly different error).

Note that virtualenv/pyvenv is not my primary use case. I could easily use conda-environments for that. But I need to use tox which uses virtualenv.

jenisys commented Dec 21, 2015

This is probably a condo/virtualenv co-issue.
I have the same problems with Python 2.7.11 and Python 3.5.1 and condo 3.18.9, pip 7.1.2, virtualenv 13.1.2. With Python 3.5.1, virtual environment creation fails with "virtualenv" and "pyvenv" (with a slightly different error).

Note that virtualenv/pyvenv is not my primary use case. I could easily use conda-environments for that. But I need to use tox which uses virtualenv.

@tfmorris

This comment has been minimized.

Show comment
Hide comment
@tfmorris

tfmorris Jan 25, 2016

Known, unresolved, issue for 6+ months?!?! That's pretty disappointing.

I ran into this after downgrading from 2.7.11 to 2.7.10, as recommended, due to another virtualenv / conda issue. Can't conda learn to play with others?

Downgrading (again) from python 2.7.10 to 2.7.9 worked for me on OS X. The original 2.7.11 error was:

$ virtualenv .
New python executable in ./bin/python
Installing setuptools, pip, wheel...
  Complete output from command /Users/tfmorris/git/git-lit/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 15, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/Users/tfmorris/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/tfmorris/git/git-lit/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/tfmorris/git/git-lit/lib/python2.7/lib-dynload/_io.so

Known, unresolved, issue for 6+ months?!?! That's pretty disappointing.

I ran into this after downgrading from 2.7.11 to 2.7.10, as recommended, due to another virtualenv / conda issue. Can't conda learn to play with others?

Downgrading (again) from python 2.7.10 to 2.7.9 worked for me on OS X. The original 2.7.11 error was:

$ virtualenv .
New python executable in ./bin/python
Installing setuptools, pip, wheel...
  Complete output from command /Users/tfmorris/git/git-lit/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.0.1-py2.py3-none-any.whl/pip/utils/__init__.py", line 15, in <module>
  File "/Users/tfmorris/anaconda/lib/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/Users/tfmorris/anaconda/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Users/tfmorris/git/git-lit/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Users/tfmorris/git/git-lit/lib/python2.7/lib-dynload/_io.so
@chenghlee

This comment has been minimized.

Show comment
Hide comment
@chenghlee

chenghlee Feb 2, 2016

I just ran into this issue. In my case, the problem seems originate from having the DYLD_LIBRARY_PATH environment variable set; unsetting this environment variable fixes the issue.

I didn't spend too much time debugging the issue, so I'm not 100% sure which dynamic library is actually the problem, but it seems like having DYLD_LIBRARY_PATH set causes the conda python interpreter to mistakenly load a dynamic library from outside its install directory.

I just ran into this issue. In my case, the problem seems originate from having the DYLD_LIBRARY_PATH environment variable set; unsetting this environment variable fixes the issue.

I didn't spend too much time debugging the issue, so I'm not 100% sure which dynamic library is actually the problem, but it seems like having DYLD_LIBRARY_PATH set causes the conda python interpreter to mistakenly load a dynamic library from outside its install directory.

@ilanschnell

This comment has been minimized.

Show comment
Hide comment
@ilanschnell

ilanschnell Feb 2, 2016

Member

Setting these environment variables is never a good idea, unless you're trying to debug some wired linking problem. Any program will potentially change it's behavior (or break) when you set DYLD_LIBRARY_PATH, not just the Python we bundle in Anaconda.

Member

ilanschnell commented Feb 2, 2016

Setting these environment variables is never a good idea, unless you're trying to debug some wired linking problem. Any program will potentially change it's behavior (or break) when you set DYLD_LIBRARY_PATH, not just the Python we bundle in Anaconda.

@goretkin

This comment has been minimized.

Show comment
Hide comment
@twz915

This comment has been minimized.

Show comment
Hide comment
@twz915

twz915 Feb 17, 2016

Downgrading fixed the problem for me as well. But I want to use Python 2.7.11
Another error is python version in virtual env:

tu@mac ~/workspace $ mkvirtualenv dj17
New python executable in /Users/tu/.virtualenvs/dj17/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/get_env_details
Error: deactivate must be sourced. Run 'source deactivate'
instead of 'deactivate'.

Usage: source deactivate

removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 

(dj17) tu@mac ~/workspace $ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
(dj17) tu@mac ~/workspace $ deactivate 

tu@mac ~/workspace $ python
Python 2.7.9 |Anaconda 2.5.0 (x86_64)| (default, Dec 15 2014, 10:37:34) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> 

tu@mac ~/workspace $ which virtualenv
/Users/tu/anaconda2/bin/virtualenv
tu@mac ~/workspace $ which python
/Users/tu/anaconda2/bin/python
tu@mac ~/workspace $ python -V
Python 2.7.9 :: Anaconda 2.5.0 (x86_64)
tu@mac ~/workspace $ workon dj17
Error: deactivate must be sourced. Run 'source deactivate'
instead of 'deactivate'.

Usage: source deactivate

removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 
(dj17) tu@mac ~/workspace $ python -V
Python 2.7.10

twz915 commented Feb 17, 2016

Downgrading fixed the problem for me as well. But I want to use Python 2.7.11
Another error is python version in virtual env:

tu@mac ~/workspace $ mkvirtualenv dj17
New python executable in /Users/tu/.virtualenvs/dj17/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/tu/.virtualenvs/dj17/bin/get_env_details
Error: deactivate must be sourced. Run 'source deactivate'
instead of 'deactivate'.

Usage: source deactivate

removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 

(dj17) tu@mac ~/workspace $ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
(dj17) tu@mac ~/workspace $ deactivate 

tu@mac ~/workspace $ python
Python 2.7.9 |Anaconda 2.5.0 (x86_64)| (default, Dec 15 2014, 10:37:34) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> 

tu@mac ~/workspace $ which virtualenv
/Users/tu/anaconda2/bin/virtualenv
tu@mac ~/workspace $ which python
/Users/tu/anaconda2/bin/python
tu@mac ~/workspace $ python -V
Python 2.7.9 :: Anaconda 2.5.0 (x86_64)
tu@mac ~/workspace $ workon dj17
Error: deactivate must be sourced. Run 'source deactivate'
instead of 'deactivate'.

Usage: source deactivate

removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 
(dj17) tu@mac ~/workspace $ python -V
Python 2.7.10
@agirwalkar

This comment has been minimized.

Show comment
Hide comment
@agirwalkar

agirwalkar Feb 24, 2016

downgrade python version to 2.7.9. Its working for me on OSX.

downgrade python version to 2.7.9. Its working for me on OSX.

@vijayendra-g

This comment has been minimized.

Show comment
Hide comment
@vijayendra-g

vijayendra-g Mar 5, 2016

Downgrading python to 2.7.9 not working on OSX yosemite

PFB logs

New python executable in analysis_python3/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/xxxx/Docume...s_python3/bin/python -c "import sys, pip; sys...d"] + sys.argv[1:]))" setuptools pip wheel:
Traceback (most recent call last):
File "", line 1, in
File "//anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/init.py", line 13, in
File "//anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/utils/init.py", line 15, in
File "//anaconda/lib/python2.7/zipfile.py", line 6, in
import io
File "//anaconda/lib/python2.7/io.py", line 51, in
import _io
ImportError: dlopen(/Users/xxxx/Documents/envs/analysis_python3/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /Users/xxxx/Documents/envs/analysis_python3/lib/python2.7/lib-dynload/_io.so
Expected in: dynamic lookup


...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "//anaconda/bin/virtualenv", line 11, in
sys.exit(main())
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 832, in main
symlink=options.symlink)
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 1004, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 969, in install_wheel
'PIP_NO_INDEX': '1'
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 910, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/xxx/Docume...s_python3/bin/python -c "import sys, pip; sys...d"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1

Downgrading python to 2.7.9 not working on OSX yosemite

PFB logs

New python executable in analysis_python3/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/xxxx/Docume...s_python3/bin/python -c "import sys, pip; sys...d"] + sys.argv[1:]))" setuptools pip wheel:
Traceback (most recent call last):
File "", line 1, in
File "//anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/init.py", line 13, in
File "//anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/utils/init.py", line 15, in
File "//anaconda/lib/python2.7/zipfile.py", line 6, in
import io
File "//anaconda/lib/python2.7/io.py", line 51, in
import _io
ImportError: dlopen(/Users/xxxx/Documents/envs/analysis_python3/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /Users/xxxx/Documents/envs/analysis_python3/lib/python2.7/lib-dynload/_io.so
Expected in: dynamic lookup


...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "//anaconda/bin/virtualenv", line 11, in
sys.exit(main())
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 832, in main
symlink=options.symlink)
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 1004, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 969, in install_wheel
'PIP_NO_INDEX': '1'
File "//anaconda/lib/python2.7/site-packages/virtualenv.py", line 910, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/xxx/Docume...s_python3/bin/python -c "import sys, pip; sys...d"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Mar 7, 2016

Member

The issue here is a current incompatibility between virtualenv and conda. You can temporarily set DYLD_LIBRARY_PATH, but doing so will very likely create issues for other software you run in that same environment. While it's a hard problem with lots of gotcha, we need a solution to make conda envs play nice with virutalenvs.

Member

kalefranz commented Mar 7, 2016

The issue here is a current incompatibility between virtualenv and conda. You can temporarily set DYLD_LIBRARY_PATH, but doing so will very likely create issues for other software you run in that same environment. While it's a hard problem with lots of gotcha, we need a solution to make conda envs play nice with virutalenvs.

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Mar 7, 2016

Futzing with DYLD_LIBRARY_PATH will lead to much more trouble, so I'd avoid.

Agreed on the virtualenv vs conda front, it's a shame none of the conda maintainers seem interested...

cjw296 commented Mar 7, 2016

Futzing with DYLD_LIBRARY_PATH will lead to much more trouble, so I'd avoid.

Agreed on the virtualenv vs conda front, it's a shame none of the conda maintainers seem interested...

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Mar 7, 2016

Member

@cjw296 I'm definitely interested.

I'm going to close this issue for now because it's a fundamental issue with simultaneously using conda and virutalenv. I'm definitely interested in tackling that core issue at some point though. Would also welcome a technical outline on potential solutions.

Member

kalefranz commented Mar 7, 2016

@cjw296 I'm definitely interested.

I'm going to close this issue for now because it's a fundamental issue with simultaneously using conda and virutalenv. I'm definitely interested in tackling that core issue at some point though. Would also welcome a technical outline on potential solutions.

@kalefranz kalefranz closed this Mar 7, 2016

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Mar 7, 2016

Wow, you're "definitely interested" but effectively close the issue as "won't fix"?
Please can you re-open this issue and use it as a reminder that there are a growing number of people who are stuck on Python 2.7.9 when using conda, because upgrading any further breaks their virtualenv usage?

cjw296 commented Mar 7, 2016

Wow, you're "definitely interested" but effectively close the issue as "won't fix"?
Please can you re-open this issue and use it as a reminder that there are a growing number of people who are stuck on Python 2.7.9 when using conda, because upgrading any further breaks their virtualenv usage?

@tfmorris

This comment has been minimized.

Show comment
Hide comment
@tfmorris

tfmorris Mar 7, 2016

👍 to @cjw296's suggestion

tfmorris commented Mar 7, 2016

👍 to @cjw296's suggestion

@pjbull

This comment has been minimized.

Show comment
Hide comment
@pjbull

pjbull Mar 7, 2016

Alternatively, tackle #1277 so I can use a standard pip requirements.txt file with conda environments.

pjbull commented Mar 7, 2016

Alternatively, tackle #1277 so I can use a standard pip requirements.txt file with conda environments.

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Mar 8, 2016

@pjbull - how does that help when a package isn't available in the conda repos?

cjw296 commented Mar 8, 2016

@pjbull - how does that help when a package isn't available in the conda repos?

@papajo

This comment has been minimized.

Show comment
Hide comment
@papajo

papajo Mar 8, 2016

Just bumped into this issue...any updates?

For now I'm using this workaround:

  1. conda install virtualenv
  2. virtualenv venv
$ conda install virtualenv
Fetching package metadata: ....
Solving package specifications: ..................
Package plan for installation in environment /Users/jessep/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    openssl-1.0.2g             |                0         3.0 MB
    python-2.7.10              |                2         9.9 MB
    setuptools-20.2.2          |           py27_0         453 KB
    conda-4.0.1                |           py27_0         184 KB
    pip-8.1.0                  |           py27_0         1.5 MB
    virtualenv-13.0.1          |           py27_0         1.6 MB
    ------------------------------------------------------------
                                           Total:        16.6 MB

The following NEW packages will be INSTALLED:

    virtualenv: 13.0.1-py27_0

The following packages will be UPDATED:

    conda:      3.19.3-py27_0 --> 4.0.1-py27_0
    openssl:    1.0.2f-0      --> 1.0.2g-0
    pip:        8.0.3-py27_0  --> 8.1.0-py27_0
    setuptools: 20.1.1-py27_0 --> 20.2.2-py27_0

The following packages will be DOWNGRADED:

    python:     2.7.11-0      --> 2.7.10-2

Proceed ([y]/n)? y

Fetching packages ...
openssl-1.0.2g 100% |##########################################################################################| Time: 0:00:02   1.41 MB/s
python-2.7.10- 100% |##########################################################################################| Time: 0:00:07   1.39 MB/s
setuptools-20. 100% |##########################################################################################| Time: 0:00:00 987.20 kB/s
conda-4.0.1-py 100% |##########################################################################################| Time: 0:00:00 659.16 kB/s
pip-8.1.0-py27 100% |##########################################################################################| Time: 0:00:00   1.67 MB/s
virtualenv-13. 100% |##########################################################################################| Time: 0:00:01   1.24 MB/s
Extracting packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip, wheel...done.

papajo commented Mar 8, 2016

Just bumped into this issue...any updates?

For now I'm using this workaround:

  1. conda install virtualenv
  2. virtualenv venv
$ conda install virtualenv
Fetching package metadata: ....
Solving package specifications: ..................
Package plan for installation in environment /Users/jessep/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    openssl-1.0.2g             |                0         3.0 MB
    python-2.7.10              |                2         9.9 MB
    setuptools-20.2.2          |           py27_0         453 KB
    conda-4.0.1                |           py27_0         184 KB
    pip-8.1.0                  |           py27_0         1.5 MB
    virtualenv-13.0.1          |           py27_0         1.6 MB
    ------------------------------------------------------------
                                           Total:        16.6 MB

The following NEW packages will be INSTALLED:

    virtualenv: 13.0.1-py27_0

The following packages will be UPDATED:

    conda:      3.19.3-py27_0 --> 4.0.1-py27_0
    openssl:    1.0.2f-0      --> 1.0.2g-0
    pip:        8.0.3-py27_0  --> 8.1.0-py27_0
    setuptools: 20.1.1-py27_0 --> 20.2.2-py27_0

The following packages will be DOWNGRADED:

    python:     2.7.11-0      --> 2.7.10-2

Proceed ([y]/n)? y

Fetching packages ...
openssl-1.0.2g 100% |##########################################################################################| Time: 0:00:02   1.41 MB/s
python-2.7.10- 100% |##########################################################################################| Time: 0:00:07   1.39 MB/s
setuptools-20. 100% |##########################################################################################| Time: 0:00:00 987.20 kB/s
conda-4.0.1-py 100% |##########################################################################################| Time: 0:00:00 659.16 kB/s
pip-8.1.0-py27 100% |##########################################################################################| Time: 0:00:00   1.67 MB/s
virtualenv-13. 100% |##########################################################################################| Time: 0:00:01   1.24 MB/s
Extracting packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|#############################################################################################################| 100%
$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip, wheel...done.
@pjbull

This comment has been minimized.

Show comment
Hide comment
@pjbull

pjbull Mar 8, 2016

@cjw296 yep, it only helps if conda environments can actually replace virtualenvs (i.e., fallback to install packages from pip).

pjbull commented Mar 8, 2016

@cjw296 yep, it only helps if conda environments can actually replace virtualenvs (i.e., fallback to install packages from pip).

@Chris-Larkin

This comment has been minimized.

Show comment
Hide comment
@Chris-Larkin

Chris-Larkin Aug 23, 2016

@cjw296 Thanks for your comments, and forgive my tardy reply. Using conda within my virtualenv caused a few problems that I wasn't able to resolve, and I resorted to restoring factory settings on my machine and reinstalling all software virtualenvs from scratch. It's all sorted now though and I have everything I need up and running - I also learned a fair bit about the back end of package management in conda and virtualenvs!

And apologies for posting an inappropriate message. I'm quite new to github so am still learning the etiquette.

Cheers

@cjw296 Thanks for your comments, and forgive my tardy reply. Using conda within my virtualenv caused a few problems that I wasn't able to resolve, and I resorted to restoring factory settings on my machine and reinstalling all software virtualenvs from scratch. It's all sorted now though and I have everything I need up and running - I also learned a fair bit about the back end of package management in conda and virtualenvs!

And apologies for posting an inappropriate message. I'm quite new to github so am still learning the etiquette.

Cheers

@yzliao yzliao referenced this issue in platformio/platformio-atom-ide Sep 6, 2016

Closed

MA OS X : PlatformIO: Unable to create a virtualenv. #146

nicolaiarocci added a commit to nicolaiarocci/dotfiles that referenced this issue Sep 26, 2016

@sw-yx

This comment has been minimized.

Show comment
Hide comment
@sw-yx

sw-yx Sep 29, 2016

september 2016 here, still having to downgrade to 2.7.9, that does fix it but boy should some one fix setuptools

sw-yx commented Sep 29, 2016

september 2016 here, still having to downgrade to 2.7.9, that does fix it but boy should some one fix setuptools

@Sophtware

This comment has been minimized.

Show comment
Hide comment
@Sophtware

Sophtware Oct 30, 2016

October 2016. I was trying to get jedi-vim to work on my new Mac (OS X Sierra) and I was getting the message "Please install Jedi if you want to use jedi-vim." when I already had Jedi on the version of Python my Vim was using (which was the miniconda one). Calling conda install python=2.7.9 (ie: downgrading from python 2.7.10 to 2.7.9) fixed the error message.

October 2016. I was trying to get jedi-vim to work on my new Mac (OS X Sierra) and I was getting the message "Please install Jedi if you want to use jedi-vim." when I already had Jedi on the version of Python my Vim was using (which was the miniconda one). Calling conda install python=2.7.9 (ie: downgrading from python 2.7.10 to 2.7.9) fixed the error message.

@gcraigm

This comment has been minimized.

Show comment
Hide comment
@gcraigm

gcraigm Nov 1, 2016

Thanks all for the details, especially @kalefranz. Just to underscore what was suggested above, the solution is not to downgrade specifically to python 2.7.9 but to downgrade conda to whatever version is the system version. Today (on OS X 10.11.6) I downgraded from 2.7.12 to 2.7.10 and solved the same problem.

gcraigm commented Nov 1, 2016

Thanks all for the details, especially @kalefranz. Just to underscore what was suggested above, the solution is not to downgrade specifically to python 2.7.9 but to downgrade conda to whatever version is the system version. Today (on OS X 10.11.6) I downgraded from 2.7.12 to 2.7.10 and solved the same problem.

@shizhh

This comment has been minimized.

Show comment
Hide comment
@shizhh

shizhh Nov 7, 2016

macOS, downgrade python version to 2.7.9. Its working for me too.
conda install python=2.7.9

shizhh commented Nov 7, 2016

macOS, downgrade python version to 2.7.9. Its working for me too.
conda install python=2.7.9

@krishnayogik

This comment has been minimized.

Show comment
Hide comment
@krishnayogik

krishnayogik Nov 30, 2016

as of nov 2016 downgrading to python 2.7.9 is the best solution :(

as of nov 2016 downgrading to python 2.7.9 is the best solution :(

@heineman-bob heineman-bob referenced this issue in aws/chalice Dec 2, 2016

Closed

Conda Virtual Environments? #92

@jfbu

This comment has been minimized.

Show comment
Hide comment
@jfbu

jfbu Jan 16, 2017

mac os x 10.9.5 with /usr/bin/python version 2.7.5, conda one version 2.7.13, same Symbol not found: __PyCodecInfo_GetIncrementalDecoder error as in #1367 (comment), downgrading to python 2.7.9 fixes it for me too.

Actually the python installed by virtualenv is the one in /usr/bin (2.7.5), despite trying also with -p option and a path pointing to the conda Python 2.7.9.

$ virtualenv -p /opt/miniconda3/envs/py27/bin/python venv2
Already using interpreter /opt/miniconda3/envs/py27/bin/python
New python executable in /Users/xxx/path/venv2/bin/python
Installing setuptools, pip, wheel...done.
$ which -a python
/Users/xxx/path/venv2/bin/python
/opt/miniconda3/envs/py27/bin/python
/opt/miniconda3/bin/python
/usr/bin/python
(venv2) 
$ /opt/miniconda3/envs/py27/bin/python --version
Python 2.7.9 :: Continuum Analytics, Inc.
(venv2) 
$ /usr/bin/python --version
Python 2.7.5
(venv2) 
$ python --version
Python 2.7.5
(venv2) 

edit: method described at #1367 (comment) by @stuarteberg worked for me to get Python 2.7.9 and not the system one in my virtualenv. (thanks @stuarteberg ...) and in fact then I can use Python version of my choice.

edited to mention that the new virtualenv mentioned at #1367 (comment) fixes it for me on mac os x 10.9.5, using either Python 2.7.13 or 3.5.2 from conda.

jfbu commented Jan 16, 2017

mac os x 10.9.5 with /usr/bin/python version 2.7.5, conda one version 2.7.13, same Symbol not found: __PyCodecInfo_GetIncrementalDecoder error as in #1367 (comment), downgrading to python 2.7.9 fixes it for me too.

Actually the python installed by virtualenv is the one in /usr/bin (2.7.5), despite trying also with -p option and a path pointing to the conda Python 2.7.9.

$ virtualenv -p /opt/miniconda3/envs/py27/bin/python venv2
Already using interpreter /opt/miniconda3/envs/py27/bin/python
New python executable in /Users/xxx/path/venv2/bin/python
Installing setuptools, pip, wheel...done.
$ which -a python
/Users/xxx/path/venv2/bin/python
/opt/miniconda3/envs/py27/bin/python
/opt/miniconda3/bin/python
/usr/bin/python
(venv2) 
$ /opt/miniconda3/envs/py27/bin/python --version
Python 2.7.9 :: Continuum Analytics, Inc.
(venv2) 
$ /usr/bin/python --version
Python 2.7.5
(venv2) 
$ python --version
Python 2.7.5
(venv2) 

edit: method described at #1367 (comment) by @stuarteberg worked for me to get Python 2.7.9 and not the system one in my virtualenv. (thanks @stuarteberg ...) and in fact then I can use Python version of my choice.

edited to mention that the new virtualenv mentioned at #1367 (comment) fixes it for me on mac os x 10.9.5, using either Python 2.7.13 or 3.5.2 from conda.

@is55555

This comment has been minimized.

Show comment
Hide comment
@is55555

is55555 Feb 3, 2017

February 2017, and still no solution not involving untested hacks.

is55555 commented Feb 3, 2017

February 2017, and still no solution not involving untested hacks.

@alexcombessie

This comment has been minimized.

Show comment
Hide comment
@alexcombessie

alexcombessie Feb 6, 2017

I confirm that the downgrade to Python 2.7.9 worked in my case.

I confirm that the downgrade to Python 2.7.9 worked in my case.

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Feb 6, 2017

Member

While it's buried above, here's a cross-link reference: conda-forge/staged-recipes#1139

There's not much conda can do to fix this. The problem is really structural with virtualenv. I'm not sure if anyone has yet filed an issue on the virtualenv tracker or not.

Member

kalefranz commented Feb 6, 2017

While it's buried above, here's a cross-link reference: conda-forge/staged-recipes#1139

There's not much conda can do to fix this. The problem is really structural with virtualenv. I'm not sure if anyone has yet filed an issue on the virtualenv tracker or not.

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Feb 10, 2017

Member

@mingwandroid Has just released into repo.continuum.io a patched virtualenv package that fixes this issue. You must conda install virtualenv (or conda update); the version you get from pip install virtualenv will not work. This was quite the heroic piece of engineering work. Thanks @mingwandroid 👏

Member

kalefranz commented Feb 10, 2017

@mingwandroid Has just released into repo.continuum.io a patched virtualenv package that fixes this issue. You must conda install virtualenv (or conda update); the version you get from pip install virtualenv will not work. This was quite the heroic piece of engineering work. Thanks @mingwandroid 👏

@kalefranz kalefranz closed this Feb 10, 2017

@is55555

This comment has been minimized.

Show comment
Hide comment
@is55555

is55555 Feb 10, 2017

That's great news. Thanks s @mingwandroid and thanks Kale for letting me know.

is55555 commented Feb 10, 2017

That's great news. Thanks s @mingwandroid and thanks Kale for letting me know.

@dakl

This comment has been minimized.

Show comment
Hide comment
@dakl

dakl Feb 12, 2017

Great news indeed! 🎉🎉🎉 @mingwandroid

dakl commented Feb 12, 2017

Great news indeed! 🎉🎉🎉 @mingwandroid

@mingwandroid

This comment has been minimized.

Show comment
Hide comment
@mingwandroid

mingwandroid Feb 12, 2017

Contributor

No problem everyone. Personally, I much prefer conda envs to virtualenvs, but I wanted to fix this one because it seems to be important to your workflows.

Contributor

mingwandroid commented Feb 12, 2017

No problem everyone. Personally, I much prefer conda envs to virtualenvs, but I wanted to fix this one because it seems to be important to your workflows.

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Feb 12, 2017

Tangential: @mingwandroid - how do you ensure repeatable builds of your conda environments? environment.yml or something else?

cjw296 commented Feb 12, 2017

Tangential: @mingwandroid - how do you ensure repeatable builds of your conda environments? environment.yml or something else?

@mingwandroid

This comment has been minimized.

Show comment
Hide comment
@mingwandroid

mingwandroid Feb 12, 2017

Contributor

Mostly I use a single root env. Conda-build creates the other envs that I frequently use (build and test ones) since I spend most of my time building conda packages rather than doing general computing, Python or data science work.

Contributor

mingwandroid commented Feb 12, 2017

Mostly I use a single root env. Conda-build creates the other envs that I frequently use (build and test ones) since I spend most of my time building conda packages rather than doing general computing, Python or data science work.

@mingwandroid

This comment has been minimized.

Show comment
Hide comment
@mingwandroid

mingwandroid Feb 12, 2017

Contributor

But if I do need reproducibility, I use conda list -n <env> -e

Contributor

mingwandroid commented Feb 12, 2017

But if I do need reproducibility, I use conda list -n <env> -e

@ndjensen ndjensen referenced this issue in ninia/jep Mar 6, 2017

Closed

Jep issue on OS X with Anaconda #71

@brlrb

This comment has been minimized.

Show comment
Hide comment
@brlrb

brlrb Mar 11, 2017

I am on OS Sierra(10.12) and downgrading fixed the issue for me.

downgrade code via @pjbull : conda install python=2.7.9

brlrb commented Mar 11, 2017

I am on OS Sierra(10.12) and downgrading fixed the issue for me.

downgrade code via @pjbull : conda install python=2.7.9

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Mar 12, 2017

@brlrb - can you try doing a conda update virtualenv and then creating a new virtualenv? @mingwandroid has fixed the real problem here!

cjw296 commented Mar 12, 2017

@brlrb - can you try doing a conda update virtualenv and then creating a new virtualenv? @mingwandroid has fixed the real problem here!

@marchofreason

This comment has been minimized.

Show comment
Hide comment
@marchofreason

marchofreason Apr 24, 2017

I'm on OS Sierra and downgrading also fixed this issue for me.

I'm on OS Sierra and downgrading also fixed this issue for me.

@mingwandroid

This comment has been minimized.

Show comment
Hide comment
@mingwandroid

mingwandroid Apr 24, 2017

Contributor

@marchofreason, this core problem here is fixed so I do not understand why you needed to downgrade. You should instead install the latest conda virtualenv package and everything should work just fine.

If it does not I would appreciate exact reproduction steps. Here are mine:

Python 3:

pushd /tmp
curl -SLO https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh -b -p /tmp/mc3
source /tmp/mc3/bin/activate
conda install -y virtualenv
mkdir -p /tmp/venv/venv
virtualenv -p $(which python) /tmp/venv/venv/my_project
/tmp/venv/venv/my_project/bin/python -c 'import sys; print(sys.prefix); print(sys.version)'

final line outputs:

/tmp/venv/venv/my_project
3.6.1 |Continuum Analytics, Inc.| (default, Mar 22 2017, 19:25:17) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)

Python 2:

source deactivate
rm -rf /tmp/venv
curl -SLO https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh
bash Miniconda2-latest-MacOSX-x86_64.sh -b -p /tmp/mc2
source /tmp/mc2/bin/activate
conda install -y virtualenv
mkdir -p /tmp/venv/venv
virtualenv -p $(which python) /tmp/venv/venv/my_project
/tmp/venv/venv/my_project/bin/python -c 'import sys; print(sys.prefix); print(sys.version)'

final line outputs:

/tmp/venv/venv/my_project
2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
Contributor

mingwandroid commented Apr 24, 2017

@marchofreason, this core problem here is fixed so I do not understand why you needed to downgrade. You should instead install the latest conda virtualenv package and everything should work just fine.

If it does not I would appreciate exact reproduction steps. Here are mine:

Python 3:

pushd /tmp
curl -SLO https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh -b -p /tmp/mc3
source /tmp/mc3/bin/activate
conda install -y virtualenv
mkdir -p /tmp/venv/venv
virtualenv -p $(which python) /tmp/venv/venv/my_project
/tmp/venv/venv/my_project/bin/python -c 'import sys; print(sys.prefix); print(sys.version)'

final line outputs:

/tmp/venv/venv/my_project
3.6.1 |Continuum Analytics, Inc.| (default, Mar 22 2017, 19:25:17) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)

Python 2:

source deactivate
rm -rf /tmp/venv
curl -SLO https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh
bash Miniconda2-latest-MacOSX-x86_64.sh -b -p /tmp/mc2
source /tmp/mc2/bin/activate
conda install -y virtualenv
mkdir -p /tmp/venv/venv
virtualenv -p $(which python) /tmp/venv/venv/my_project
/tmp/venv/venv/my_project/bin/python -c 'import sys; print(sys.prefix); print(sys.version)'

final line outputs:

/tmp/venv/venv/my_project
2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
@jbmaxwell

This comment has been minimized.

Show comment
Hide comment
@jbmaxwell

jbmaxwell Aug 1, 2017

wow... yeah, macOS 10.12, downgrade also fixed it for me.

wow... yeah, macOS 10.12, downgrade also fixed it for me.

@cjw296

This comment has been minimized.

Show comment
Hide comment
@cjw296

cjw296 Aug 1, 2017

@jbmaxwell - @mingwandroid fixed this problem, no need to downgrade. Please see comments above... There's a reason this issue is closed!

cjw296 commented Aug 1, 2017

@jbmaxwell - @mingwandroid fixed this problem, no need to downgrade. Please see comments above... There's a reason this issue is closed!

@duxan duxan referenced this issue in infoscout/weighted-levenshtein Aug 21, 2017

Merged

Adds the support for python 3 #6

@ben-albrecht ben-albrecht referenced this issue in chapel-lang/chapel Aug 31, 2017

Closed

Error building chpldoc with conda #7168

@ofek ofek referenced this issue in ofek/hatch Sep 23, 2017

Closed

Does it work with anaconda python? #41

@jfbu jfbu referenced this issue in sphinx-doc/sphinx Dec 22, 2017

Open

Simplified 'sphinx-build' #4320

@xuy2

This comment has been minimized.

Show comment
Hide comment
@xuy2

xuy2 Jun 21, 2018

Works for me too

xuy2 commented Jun 21, 2018

Works for me too

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