SystemError: Parent module 'setuptools' not loaded, cannot perform relative import with setuptools 50
See original GitHub issueAfter upgrading setuptools to 50.0 today, the environment fails to locate the entry points as it could not import distutils
$ python --version
Python 3.5.1
$ python -c "import distutils"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
File "<frozen importlib._bootstrap>", line 577, in module_from_spec
File "/home/gchan/tmp/setuptools-python-3.5/lib/python3.5/site-packages/_distutils_hack/__init__.py", line 82, in create_module
return importlib.import_module('._distutils', 'setuptools')
File "/home/gchan/tmp/setuptools-python-3.5/lib64/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 981, in _gcd_import
File "<frozen importlib._bootstrap>", line 931, in _sanity_check
SystemError: Parent module 'setuptools' not loaded, cannot perform relative import
The issue could not be found in the python 3.8 environment.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:53
- Comments:23 (6 by maintainers)
Top Results From Across the Web
Parent module 'setuptools' not loaded, cannot perform relative ...
SystemError : Parent module 'setuptools' not loaded, cannot perform relative import. Python - 3.5.2. How to resolve this?
Read more >[Solved] SystemError Parent Module Not Loaded Cannot ...
Systemerror parent module not loaded cannot perform relative import is raised as code fails to relative import a module from another module.
Read more >Django, python3, on install I get: "Parent module 'setuptools ...
_bootstrap>", line 931, in _sanity_check SystemError: Parent module 'setuptools' not loaded, cannot perform relative import
Read more >T261748 Travis test 3.5_with_system_site_packages fails ...
_bootstrap>", line 931, in _sanity_check SystemError: Parent module 'setuptools' not loaded, cannot perform relative import ...
Read more >Juniper Installation Failing - Site Operations Help
_bootstrap>\", line 931, in _sanity_check\nSystemError: Parent module 'setuptools' not loaded, cannot perform relative import", ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue. Worked around with downgrading and blacklisting 50.0:
and in
requirements.txt
:For what it’s worth: