Update to python3.6 breaks pip

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Update to python3.6 breaks pip

Jim Byrnes-4
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@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@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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Update to python3.6 breaks pip

Markus Weingärtner
Hi,

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

-- 

Regards 

Markus 


Am 04.05.2018 um 22:30 schrieb Jim <[hidden email]>:

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@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@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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Update to python3.6 breaks pip

Jim Byrnes-4
On 05/04/2018 04:37 PM, Markus Weingärtner wrote:
> Hi,
>
> the python3-distutils are installed?
> sudo apt install python3-distutils
>
>

That fixed it.

Thanks,  Jim


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users