0
After upgrading from 18.04 to 19.04, I can't use pip on virtualenvs with python3.6.
$ pip install scipy
Traceback (most recent call last):
File "/home/xen0f0n/dibco_local/dibco_python/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/xen0f0n/dibco_local/dibco_python/lib/python3.6/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/home/xen0f0n/dibco_local/dibco_python/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/home/xen0f0n/dibco_local/dibco_python/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/home/xen0f0n/dibco_local/dibco_python/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 14, in <module>
from distutils.util import strtobool
File "/home/xen0f0n/dibco_local/dibco_python/lib/python3.6/distutils/__init__.py", line 25, in <module>
from distutils import dist, sysconfig
ImportError: cannot import name 'dist'
When tried to re-create virtual env
$ virtualenv my_python -p /usr/bin/python3.6
Running virtualenv with interpreter /usr/bin/python3.6
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 25, in <module>
import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils.sysconfig'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
ModuleNotFoundError: No module named 'apport'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 25, in <module>
import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils.sysconfig'
I think the problem is with python3-distutils. Anyone out there facing the same problem?
Have you tried re-creating the virtual environment? – Attie – 2019-05-03T09:47:03.957
Yeah, throws exceptions...
ModuleNotFoundError: No module named 'distutils.sysconfig' ModuleNotFoundError: No module named 'apport' – xen0fon – 2019-05-03T09:56:30.643