ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)
I have tried recently manually installing python3.9 version in my Ubuntu from 3.6 version using apt install python3.9
. Then pip3 was broken. The issue is because distutils were not build for the 3.9 version.
So in my case I ran apt install python3.9-distutils
to resolve my issue.
In your case make sure to modify 3.x version in distutils command.
Matplotlib in py2exe — ImportError: cannot import name dist (File distutils\__init__.pyc)
Okay, I did not find proper solution for this problem.
I solved it with dirty hack, by simply replacing distutils dir in venv by distutils dir of system python. Now it all working and it working in venv! Don't quite sure about drawbacks of that though.
The issue as I can understand it, is that distutils of venv is really weird thing. Seems like venvwrapper or/and python packages changed it for some reasons, I don't know.
If you know something about this situation, please go ahead and add it to the thread as answers or comments. :)
ImportError: cannot import name '_unicodefun' from 'click'
This has been fixed by Black 22.3.0. Versions before that won't work with click 8.1.0.
Incompatible with click 8.1.0 (ImportError: cannot import name '_unicodefun' from 'click') #2964
E.g.: black.yml
python-version: 3.8
- name: install black
run: |
- pip install black==20.8b1
+ pip install black==22.3.0
- name: run black
run: |
black . --check --line-length 100
https://github.com/Clinical-Genomics/cgbeacon2/pull/221/files
As a workaround, pin click
to the last version via pip install --upgrade click==8.0.2
.
How to solve this error ImportError: cannot import name 'StaticModule' from 'setuptools.config'?
setuptools 61 moved setuptools.config.StaticModule
to setuptools.config.expand.StaticModule
(see #365). This bug was reported to the jupyter-packaging developers in #130 and fixed in #131 which was first included in jupyter-packaging 0.12. So either downgrading to setuptools 60 or upgrading to jupyter-packaging 0.12 should fix your issue.
Quart error: ImportError: cannot import name 'Headers' from 'h11._headers'
I've resolved it by deleting the h11
and h11-0.13.0.dist-info
folders in my Python environment (for you this seems like the directory is /opt/virtualenvs/python3/lib/python3.8/site-packages/
) and just running pip install quart
again afterwards.
Related Topics
Python Portable, Linux & Windows
How to Cleanly Kill Subprocesses in Python
Could Not Find or Load the Qt Platform Plugin "Xcb"
Opencv (Via Python) on Linux: Set Frame Width/Height
Install Tkinter and Python Locally
Error: Could Not Build Wheels for Glpk Which Use Pep 517 and Cannot Be Installed Directly
Python Not Displaying Executable Output Properly
Cat, Grep and Cut - Translated to Python
Create Single Python Executable Module
Python Valueerror: Embedded Null Byte When Reading Png File from Bash Pipe
Cannot "Pip Install Cryptography" in Docker Alpine Linux 3.3 with Openssl 1.0.2G and Python 2.7
How to Recover the Return Value of a Function Passed to Multiprocessing.Process