Update to python3.6 breaks pip

Markus Weingärtner markus at weingaertner-it.de
Fri May 4 21:37:35 UTC 2018


Hi,

the python3-distutils are installed?
sudo apt install python3-distutils
-- 
Regards 

Markus 

> Am 04.05.2018 um 22:30 schrieb Jim <jf_byrnes at comcast.net>:
> 
> This happened to me on a system running Mint 18. I received an update to python 3.6 the other day. After I applied it I could no longer use pip in the virtual environment I set up for python3.6.
> 
> (env36) jfb at jims-mint18 ~ $ pip3
> Traceback (most recent call last):
>  File "/home/jfb/EVs/env36/bin/pip3", line 7, in <module>
>    from pip import main
>  File "/home/jfb/EVs/env36/lib/python3.6/site-packages/pip/__init__.py", line 43, in <module>
>    from pip.utils import get_installed_distributions, get_prog
>  File "/home/jfb/EVs/env36/lib/python3.6/site-packages/pip/utils/__init__.py", line 23, in <module>
>    from pip.locations import (
>  File "/home/jfb/EVs/env36/lib/python3.6/site-packages/pip/locations.py", line 9, in <module>
>    from distutils import sysconfig
> ImportError: cannot import name 'sysconfig'
> 
> I searched for sysconfig and found this:
> 
> /home/jfb/EVs/env36/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-36.pyc
> 
> /home/jfb/EVs/env36/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg
> 
> /home/jfb/EVs/env36/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/sysconfig.py
> 
> These locations are the same I see in my env35 environment for python3.5.
> 
> On a python list it was suggested I try:
> 
> jfb at jims-mint18 ~ $ python3.6 -m venv /home/jfb/EVs/env365 && ./venv/bin/pip help
> The virtual environment was not created successfully because ensurepip is not
> available.  On Debian/Ubuntu systems, you need to install the python3-venv
> package using the following command.
> 
>    apt-get install python3-venv
> 
> You may need to use sudo with that command.  After installing the python3-venv
> package, recreate your virtual environment.
> 
> Failing command: ['/home/jfb/EVs/env365/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']
> 
> Couple of things troubling about this message. I just checked and python3-venv is installed, in fact I used it to install the python3.6 environment I'm having problems with. I did a search and ensurepip is on my system at //usr/lib/python3.6/ensurepip.
> 
> I am wondering if anyone else has seen this problem and knows how to fix it.
> 
> Regards,  Jim
> 
> 
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20180504/11436e0a/attachment.html>


More information about the ubuntu-users mailing list