Creating a clean env with python 3 and conda-forge on creates the following error under Linux x86-64
stuart@dyn017220:~/GitHub/sunpy> conda create -n test python
Fetching package metadata: ......
Solving package specifications: .........
Package plan for installation in environment /home/stuart/.conda/envs/test:
The following NEW packages will be INSTALLED:
ncurses: 5.9-7
openssl: 1.0.2h-1
pip: 8.1.2-py35_0
python: 3.5.2-1
readline: 6.2-2 (soft-link)
setuptools: 23.0.0-py35_0
sqlite: 3.13.0-1
tk: 8.5.19-0
wheel: 0.29.0-py35_0 (soft-link)
xz: 5.2.2-0
zlib: 1.2.8-3
Proceed ([y]/n)?
Linking packages ...
[ COMPLETE ]|#################################################################################################################################################################################################################| 100%
#
# To activate this environment, use:
# $ source activate test
#
# To deactivate this environment, use:
# $ source deactivate
#
stuart@dyn017220:~/GitHub/sunpy> source activate test
discarding /opt/miniconda/bin from PATH
prepending /home/stuart/.conda/envs/test/bin to PATH
(test)stuart@dyn017220:~/GitHub/sunpy> python
Python 3.5.2 | packaged by conda-forge | (default, Jul 7 2016, 12:51:46)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/etc/pythonstart", line 7, in <module>
import readline
ImportError: /home/stuart/.conda/envs/test/lib/python3.5/lib-dynload/../../libreadline.so.6: undefined symbol: PC
>>>
@Cadair If you install the readline package from the conda-forge channel this error should go away. This can be done using: conda install -c conda-forge readline=6.2
I'm able to reproduce this if I create an environment which contains the conda-forge channel python-3.5.2-1 package and the defaults channel readline 6.2-2 package. If the readline 6.2-0 package from the conda-forge channel is installed instead the error goes away.
~$ conda create -n test python=3.5
Fetching package metadata .......
Solving package specifications: ..........
Package plan for installation in environment /home/jhelmus/anaconda/envs/test:
The following packages will be downloaded:
package | build
---------------------------|-----------------
xz-5.2.2 | 0 644 KB defaults
zlib-1.2.8 | 3 101 KB defaults
------------------------------------------------------------
Total: 744 KB
The following NEW packages will be INSTALLED:
openssl: 1.0.2h-1 defaults
python: 3.5.2-0 defaults
readline: 6.2-2 defaults
sqlite: 3.13.0-0 defaults
tk: 8.5.18-0 defaults
xz: 5.2.2-0 defaults
zlib: 1.2.8-3 defaults
Proceed ([y]/n)? y
Pruning fetched packages from the cache ...
Fetching packages ...
xz-5.2.2-0.tar 100% |################################| Time: 0:00:00 2.75 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00 1.32 MB/s
Extracting packages ...
[ COMPLETE ]|###################################################| 100%
Linking packages ...
[ COMPLETE ]|###################################################| 100%
#
# To activate this environment, use:
# $ source activate test
#
# To deactivate this environment, use:
# $ source deactivate
#
~$ source activate test
~$ python -c "import readline"
~$ conda install -c conda-forge python
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........
Package plan for installation in environment /home/jhelmus/anaconda/envs/test:
The following NEW packages will be INSTALLED:
ncurses: 5.9-7 conda-forge
The following packages will be UPDATED:
python: 3.5.2-0 defaults --> 3.5.2-1 conda-forge
Proceed ([y]/n)? y
Unlinking packages ...
[ COMPLETE ]|###################################################| 100%
Linking packages ...
[ COMPLETE ]|###################################################| 100%
~$ python -c "import readline"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /home/jhelmus/anaconda/envs/test/lib/python3.5/lib-dynload/../../libreadline.so.6: undefined symbol: PC
~$ conda install -c conda-forge readline=6.2
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........
Package plan for installation in environment /home/jhelmus/anaconda/envs/test:
The following packages will be SUPERCEDED by a higher-priority channel:
readline: 6.2-2 defaults --> 6.2-0 conda-forge
Proceed ([y]/n)? y
Unlinking packages ...
[ COMPLETE ]|###################################################| 100%
Linking packages ...
[ COMPLETE ]|###################################################| 100%
~$ python -c "import readline"
conda info for reference.
~$ conda info
Current conda install:
platform : linux-64
conda version : 4.1.6
conda-env version : 2.5.1
conda-build version : 1.21.3
python version : 3.5.1.final.0
requests version : 2.10.0
root environment : /home/jhelmus/anaconda (writable)
default environment : /home/jhelmus/anaconda/envs/test
envs directories : /home/jhelmus/anaconda/envs
package cache : /home/jhelmus/anaconda/pkgs
channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/linux-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : /home/jhelmus/.condarc
offline mode : False
is foreign system : False
@Cadair, have you had a chance to try what @jjhelmus suggested? Does it work for you or do you still have issues?
This did fix it, but at the same time the fact it happened at all is a bug :)
Closing as the underlying issue was fixed.
Also closing as the issue is a consequence of the mix-match of defaults package of readline with conda-forge's python. Based on the info shown above, it suggest that there is a problem with readline from defaults that needs to be addressed. As a result, the issue is an upstream issue.
Finally closing as channel priority available in conda 4.1.x should largely avoid mix-matching dependencies in this way as it should try to pull from one channel either conda-forge or defaults primarily as appropriate.
Sorry you had issues @Cadair. Glad we were able to help you fix them. Would recommend raising this issue to anaconda-recipes.
Most helpful comment
@Cadair If you install the readline package from the
conda-forgechannel this error should go away. This can be done using:conda install -c conda-forge readline=6.2I'm able to reproduce this if I create an environment which contains the
conda-forgechannel python-3.5.2-1 package and thedefaultschannel readline 6.2-2 package. If the readline 6.2-0 package from theconda-forgechannel is installed instead the error goes away.conda info for reference.