-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken with Python 3 and Ubuntu 18.04 #2922
Comments
Actually it is not virtualenv either, it is Ubuntu. Their built-in Python is broken: https://bugs.launchpad.net/ubuntu/+source/apt-btrfs-snapshot/+bug/1763923 As a general rule: Don’t pip-install things to the system Python, almost ever. The system distribution sometimes introduces bugs we cannot anticipate, and cause unnecessary troubles. |
I believe this can be worked around by installing |
I run into the same issue.
I got the same error.
to solve this problem |
While @redliu312 is the most liked answer, it isn't the right answer. Everyone should be wary of pip installing anything to the system's python (it's owned by root Some of you may have a python installed in your user locations (e.g., Anaconda) and also run into the same error. Checking $ pipenv install
...
Using /path/to/python (<some_version>) to create virtualenv... If your path to Python isn't the path you wanted try recreating your environment via |
|
This has worked for me thanks |
should be |
All the mentioned solutions are not working here.
"python2-distutils" does not exist here, at all. Upgrading python3-distutils to 3.8 didn't help either. |
I tried all the remedies above and nothing worked. I built and installed python 3.6.8 from source, and that fixed the issue. |
For those having this issue, removing and reinstalling python3, then reinstalling distutils as above fixed the issue. This was after upgrading from 19.10 to 20.04 (not the smartest idea if you're stuck in the depths of countryside with a 1mb internet line btw). |
Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! OS: Linux vpn 5.7.0-kali1-amd64 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux pip list:Package Version
---------------------------- --------------
absl-py 0.9.0
AdvancedHTTPServer 2.2.0
aiodns 2.0.0
alembic 1.4.2
aniso8601 7.0.0
appdirs 1.4.4
asgiref 3.2.10
asn1crypto 1.3.0
astroid 2.3.3
astunparse 1.6.3
atomicwrites 1.4.0
attrs 19.3.0
Automat 20.2.0
Babel 2.8.0
backcall 0.2.0
basemap 1.2.1
bcrypt 3.1.7
beautifulsoup4 4.9.1
binwalk 2.2.0
bleach 3.1.5
blinker 1.4
boltons 20.2.0
bottle 0.12.18
Brlapi 0.7.0
Brotli 1.0.7
cachetools 4.1.1
cbor 1.0.0
certifi 2020.6.20
cffi 1.14.0
Chameleon 3.8.1
chardet 3.0.4
click 7.1.2
click-plugins 1.1.1
colorama 0.4.3
constantly 15.1.0
cryptography 2.9.2
cupshelpers 1.0
cycler 0.10.0
dbus-python 1.2.16
decorator 4.4.2
defusedxml 0.6.0
deluge 2.0.3
deprecation 2.1.0
dicttoxml 1.7.4
distlib 0.3.1
distro 1.5.0
distro-info 0.23
Django 3.0.8
dnslib 0.9.14
dnspython 2.0.0
ecdsa 0.15
email-validator 1.1.1
entrypoints 0.3
et-xmlfile 1.0.1
faraday-plugins 1.2
filedepot 0.5.2
filelock 3.0.12
filteralchemy 0.1.0
flasgger 0.9.4
Flask 1.1.2
Flask-BabelEx 0.9.4
Flask-Classful 0.14.1
Flask-KVSession-fork 0.6.3
Flask-Login 0.5.0
Flask-Mail 0.9.1
Flask-Principal 0.4.0
Flask-RESTful 0.3.8
Flask-Restless 0.17.0
Flask-Security 3.0.0
Flask-Session 0.3.1
Flask-SQLAlchemy 2.4.0
Flask-WTF 0.14.3
future 0.18.2
gast 0.3.3
GeoIP 1.3.2
geoip2 2.9.0
geojson 2.5.0
gevent 1.4.0
google-auth 1.18.0
google-auth-oauthlib 0.4.1
google-pasta 0.2.0
gpg 1.13.1-unknown
graphene 2.1.7
graphene-sqlalchemy 2.1.2
graphql-core 2.3.2
graphql-relay 2.0.1
greenlet 0.4.15
grequests 0.4.0
grpcio 1.30.0
h11 0.9.0
h2 3.2.0
h5py 2.10.0
hashID 3.1.4
hiredis 1.0.1
hpack 3.0.0
html2text 2020.1.16
html5lib 1.0.1
httplib2 0.18.1
hupper 1.10.2
hyperframe 5.2.0
hyperlink 19.0.0
icalendar 4.0.3
idna 2.10
impacket 0.9.21
importlib-metadata 1.6.0
incremental 16.10.1
IPy 1.0
ipykernel 5.3.1
ipython 7.16.1
ipython-genutils 0.2.0
ipywidgets 6.0.0
isort 4.3.21
itsdangerous 1.1.0
jdcal 1.0
jedi 0.17.0
Jinja2 2.11.2
jsonschema 3.2.0
jupyter-client 6.1.3
jupyter-core 4.6.3
kaitaistruct 0.8
Keras 2.4.3
Keras-Preprocessing 1.1.2
KismetCaptureFreaklabsZigbee 2018.7.0
KismetCaptureRtl433 2019.9.1
KismetCaptureRtladsb 2019.10.1
KismetCaptureRtlamr 2019.10.1
kiwisolver 1.0.1
lazy-object-proxy 1.4.3
ldap3 2.7
ldapdomaindump 0.9.1
louis 3.14.0
lxml 4.5.0
lz4 3.0.2+dfsg
Mako 1.1.3
Markdown 3.2.2
MarkupSafe 1.1.1
marshmallow 3.6.1
marshmallow-sqlalchemy 0.19.0
matplotlib 3.2.2
maxminddb 1.4.1
mccabe 0.6.1
mechanize 0.4.5
meld 3.20.2
mimerender 0.6.0
mistune 0.8.4
mitmproxy 5.1.1
more-itertools 4.2.0
msgpack 0.6.2
nassl 3.0.0
nbconvert 5.6.1
nbformat 5.0.7
netaddr 0.7.19
notebook 6.0.3
nplusone 1.0.0
numexpr 2.7.1
numpy 1.18.4
oauthlib 3.1.0
olefile 0.46
openpyxl 2.4.9
opt-einsum 3.2.1
packaging 20.4
pandas 0.25.3
pandocfilters 1.4.2
paramiko 2.6.0
parso 0.7.0
passlib 1.7.2
Paste 3.4.1
PasteDeploy 2.1.0
pbr 5.4.5
pefile 2019.4.18
pexpect 4.6.0
pickleshare 0.7.5
Pillow 6.2.1
pip 20.1.1
plaster 1.0
plaster-pastedeploy 0.5
plotly 4.7.1
pluggy 0.13.0
pluginbase 1.0.0
ply 3.11
prettytable 0.7.2
prometheus-client 0.7.1
promise 2.3
prompt-toolkit 3.0.5
protobuf 3.11.4
psycopg2 2.8.5
publicsuffix2 2.20191221
py 1.8.1
py-ubjson 0.14.0
pyasn1 0.4.2
pyasn1-modules 0.2.1
pycairo 1.16.2
pycares 3.1.1
pycparser 2.20
pycrypto 2.6.1
pycryptodomex 3.9.7
pycups 1.9.73
pycurl 7.43.0.2
pydot 1.4.1
pyelftools 0.26
pygame 1.9.6
Pygments 2.3.1
PyGObject 3.36.0
PyHamcrest 1.9.0
pyinotify 0.9.6
pylint 2.4.4
pymssql 2.1.4
PyNaCl 1.4.0
PyOpenGL 3.1.5
pyOpenSSL 19.1.0
pyotp 2.3.0
pyparsing 2.4.7
pypcapfile 0.12.1
pyperclip 1.8.0
pyproj 2.6.1
PyQRCode 1.2.1
PyQt5 5.15.0
pyqtgraph 0.11.0
pyramid 1.10.4
pyrsistent 0.15.5
pyserial 3.4
pyshp 2.1.0
PySimpleSOAP 1.16.2
pysmbc 1.0.22
PySocks 1.6.8
pytest 4.6.11
python-apt 2.1.3
python-dateutil 2.8.1
python-debian 0.1.37
python-debianbts 3.0.2
python-distutils-extra 2.39
python-editor 1.0.4
python-libtorrent 1.2.5
python-magic 0.4.16
python-mimeparse 1.6.0
python-pam 1.8.4
python-snappy 0.5.3
PyTrie 0.2
pytz 2020.1
pyxdg 0.26
PyYAML 5.3.1
pyzmq 18.1.1
qrcode 6.1
redis 3.3.11
rencode 1.0.6
reportbug 7.7.0
repoze.lru 0.7
requests 2.23.0
requests-file 1.5.1
requests-oauthlib 1.3.0
retrying 1.3.3
rq 1.4.0
rsa 4.6
ruamel.yaml 0.16.10
ruamel.yaml.clib 0.2.0
rule-engine 1.1.0
Rx 1.6.1
scapy 2.4.3
scipy 1.4.1
Send2Trash 1.5.0
service-identity 18.1.0
setproctitle 1.1.10
setuptools 46.1.3
shodan 1.23.0
simplejson 3.17.0
simplekv 0.13.0
sip 4.19.23
six 1.15.0
smoke-zephyr 2.0.0
sortedcontainers 2.1.0
soupsieve 2.0.1
speaklater 1.3
SQLAlchemy 1.3.18
sqlalchemy-schemadisplay 1.3
sqlparse 0.3.1
sslyze 3.0.8
stanza 1.0.0
stevedore 1.32.0
syslog-rfc5424-formatter 1.2.2
tables 3.6.1
Tempita 0.5.2
tensorboard 2.2.2
tensorboard-plugin-wit 1.7.0
tensorflow 2.2.0
tensorflow-estimator 2.2.0
termcolor 1.1.0
terminado 0.8.2
testpath 0.4.4
texttable 1.6.2
theHarvester 3.1.0
tls-parser 1.2.2
torch 1.5.0
tornado 5.1.1
tqdm 4.43.0
traitlets 4.3.3
translationstring 1.3
Twisted 18.9.0
txaio 20.4.1
typing-extensions 3.7.4.2
tzlocal 2.1b1
u-msgpack-python 2.3.0
unattended-upgrades 0.1
unicodecsv 0.14.1
Unidecode 1.1.1
urllib3 1.25.9
urwid 2.1.0
venusian 3.0.0
virtualenv 20.0.27
wafw00f 2.1.0
waitress 1.4.1
wcwidth 0.1.9
webargs 6.1.0
webencodings 0.5.1
WebOb 1.8.6
websocket-client 0.53.0
WebTest 2.0.34
Werkzeug 1.0.0
wfuzz 2.4.5
wheel 0.34.2
widgetsnbextension 2.0.0
wifite 2.5.5
wrapt 1.11.2
wsproto 0.15.0
WTForms 2.2.1
xlrd 1.1.0
XlsxWriter 1.1.2
xlwt 1.3.0
yara-python 3.10.0
zipp 1.0.0
zope.component 4.3.0
zope.deprecation 4.4.0
zope.event 4.4
zope.hookable 5.0.1
zope.interface 4.7.1 Steps:
For restoring virtual environmently only:
Then you're good to go!!!Successfully restored virtualenv without losing packages!!!! |
Ran into this problem today on a clean install of Linux Lite, which is built on Ubuntu 20.04.2. I could create a virtual environment in python 3.8, but not with 3.7. Running
I fixed my error by adding the deadsnakes ppa to apt and installing python 3.7 from their packages. That gave me python 3.7.9, and now I can create virtual environments in both 3.7 and 3.8.
Running
H |
This is probably not a bug of Pipenv per se (virtualenv -p python3 had a similar issue), however opening just in case this helps someone.
Running the latest version of Python 3 and Ubuntu 18.04, I was getting the following error:
For virtualenv - python3, I was getting the following, which helped me get to the bottom of the issue:
Installing
python3-distutils
solved the issue.The text was updated successfully, but these errors were encountered: