question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Readline fails under Python 3.5.2

See original GitHub issue

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
>>> 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
jjhelmuscommented, Jul 8, 2016

@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
0reactions
jakirkhamcommented, Aug 7, 2016

Sorry you had issues @Cadair. Glad we were able to help you fix them. Would recommend raising this issue to anaconda-recipes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

readline fails in venv - python - Stack Overflow
Is readline in the packages? When import readline gives ModuleNotFoundError it seems to be missing. Did you already try the solution of the ......
Read more >
Issue 29854: Segfault when readline history is more then 2 ...
I think the issue can be solved in readline or in the code using it, but I don't have more time to dig...
Read more >
Issue 25510: fileinput.FileInput.readline() always returns str ...
In Python3, fileinput.FileInput.readline() always returns str object at the end, even if in 'rb' mode. Here's a test code. import fileinput fi = ......
Read more >
Issue 25660: tabs don't work correctly in python repl
When Python is compiled with readline, repeatedly pressing <TAB> key in repl breaks the repl prompt. Below is what I see when I...
Read more >
Changelog — Python 3.5.9 documentation
3.5.9 was released because of a CDN caching problem which resulted in some users ... compatibility with bytecode files generated by CPython 3.5.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found