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.

Python 2.7: import virtualenv error: ImportError: No module named entry_points_selectable

See original GitHub issue

Issue

Virtualenv 20.6.0 does not work on Python 2.7.16 on Linux Installed with command:

python2.7 -m pip install virtualenv

tomcat@tomcat:~/$ python2.7
Python 2.7.16 (default, Oct  7 2019, 17:36:04) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import virtualenv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tomcat/.local/lib/python2.7/site-packages/virtualenv/__init__.py", line 3, in <module>
    from .run import cli_run, session_via_cli
  File "/home/tomcat/.local/lib/python2.7/site-packages/virtualenv/run/__init__.py", line 13, in <module>
    from .plugin.activators import ActivationSelector
  File "/home/tomcat/.local/lib/python2.7/site-packages/virtualenv/run/plugin/activators.py", line 6, in <module>
    from .base import ComponentBuilder
  File "/home/tomcat/.local/lib/python2.7/site-packages/virtualenv/run/plugin/base.py", line 5, in <module>
    from backports.entry_points_selectable import entry_points
ImportError: No module named entry_points_selectable
>>>

<module 'backports' from '/usr/lib64/python2.7/site-packages/backports/__init__.pyc'>

Environment

Provide at least:

  • OS: Linux Ubuntu 19.04
  • pip list of the host python where virtualenv is installed:
tomcat@tomcat:~/$ python2.7 -m pip list
Package                            Version    
---------------------------------- -----------
alembic                            1.0.6      
asn1crypto                         0.24.0     
backports.entry-points-selectable  1.1.0      
backports.functools-lru-cache      1.5        
backports.shutil-get-terminal-size 1.0.0      
banal                              0.4.2      
beautifulsoup4                     4.7.1      
certifi                            2018.11.29 
chardet                            3.0.4      
configparser                       4.0.2      
contextlib2                        0.6.0.post1
cryptography                       2.3        
dataset                            1.1.0      
decorator                          4.3.0      
distlib                            0.3.2      
entrypoints                        0.3        
enum34                             1.1.6      
filelock                           3.0.12     
idna                               2.8        
importlib-metadata                 2.1.1      
importlib-resources                3.3.1      
ipaddress                          1.0.17     
ipython                            5.8.0      
ipython-genutils                   0.2.0      
keyring                            17.1.1     
keyrings.alt                       3.1.1      
Mako                               1.0.7      
MarkupSafe                         1.1.0      
normality                          1.0.0      
pathlib2                           2.3.3      
pexpect                            4.6.0      
pickleshare                        0.7.5      
pip                                18.1       
platformdirs                       2.0.2      
prompt-toolkit                     1.0.15     
pycrypto                           2.6.1      
Pygments                           2.3.1      
PyGObject                          3.32.0     
PyICU                              2.2        
pyTelegramBotAPI                   3.7.2      
python-dateutil                    2.7.5      
python-editor                      1.0.3      
pyxdg                              0.25       
requests                           2.21.0     
scandir                            1.9.0      
SecretStorage                      2.3.1      
setuptools                         40.8.0     
simplegeneric                      0.8.1      
singledispatch                     3.6.2      
six                                1.12.0     
soupsieve                          1.7.1      
SQLAlchemy                         1.2.16     
traitlets                          4.3.2      
typing                             3.10.0.0   
urllib3                            1.24.1     
virtualenv                         20.6.0     
wcwidth                            0.1.7      
wheel                              0.32.3     
zipp                               1.2.0

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:


Can you please suggest which prev version I should use?

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
joaodelgado13commented, Jul 22, 2021

I had the same problem, try 20.4.7

0reactions
gaborbernatcommented, Aug 15, 2021

Seems a pip issue, so closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named entry_points_selectable
Python 2.7 : import virtualenv error: ImportError: No module named entry_points_selectable.
Read more >
ImportError: No module named virtualenv - Stack Overflow
This worked for me on OS X using the MacPorts Python. Although MacPorts includes ports for virtualenv and virtualenvwrapper , they are outdated....
Read more >
PYTHON : ImportError: No module named virtualenv - YouTube
PYTHON : ImportError : No module named virtualenv [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTHON ...
Read more >
Importerror: No Module Named Functools Windows 10
Python 2.7 : import virtualenv error: ImportError: No module named entrypointsselectable Issue.Virtualenv 20.6.0 does not work on Python 2.7.Environment.
Read more >
python 2.7 => ImportError: No module named _io - Ask Ubuntu
Unfortunately I have a Python problem. I was trying to use pip from a virtualenv I created, to install packages from a requirements.txt...
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