Python 3.8.1 installation error
See original GitHub issueI’m trying to use Python 3.8.1 to pip install COCOTB on Linux Suse12 machine. I got the error like this, “ModuleNotFoundError: No module named ‘_ctypes’”.
Any ideas?
The trace of the error is like below:
Processing /prj/tbs/5g/sandiego/hw/main/users/hctseng/dev5g/coco3/cocotb
Installing build dependencies ... done
Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 331, in run
resolver.resolve(requirement_set)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 515, in prepare_linked_requirement
abstract_dist = _get_prepared_distribution(
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
self._setup_isolation(finder)
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 96, in _setup_isolation
reqs = backend.get_requires_for_build_wheel()
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 151, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 255, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
File "/prj/tbs/5g/sandiego/hw/scratch/sims/hctseng/coco3/venv3.8.1/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 63, in _build_backend
obj = import_module(mod_path)
File "/pkg/qct/software/python/sles12/3.8.1/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/pip-build-env-loac6991/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 19, in <module>
from setuptools.dist import Distribution, Feature
File "/tmp/pip-build-env-loac6991/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 36, in <module>
from setuptools import windows_support
File "/tmp/pip-build-env-loac6991/overlay/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/pkg/qct/software/python/sles12/3.8.1/lib/python3.8/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
I don’t have this issue with Python 3.5. Your help/input will be highly appreciated!
Thanks, Richard
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Python installation fails when run under system account if ...
Issue 41800 : Python installation fails when run under system account if there is already an existing installation on the system already -...
Read more >No Python 3.8 installation was detected - Stack Overflow
Run the Python installer (.exe) file · Select the repair option, let it process. · Run the Installer again. This time select uninstall...
Read more >installation error in python 3.8.1 · Issue #100 - GitHub
The installation fails like this ERROR: Could not find a version that satisfies the requirement torch>=1.3.0 (from ...
Read more >Can't install Python 3.8 on Windows 10 - Super User
I tried to install Python in a new folder but got an error because another installation was going on (it wasn't another Python...
Read more >Failed to Install Python Interpreter (Both Python 3.8 & 3.9)
Initially installing directly via PyCharm as below - gives me error code 1,638, and proposes to install manually. Proceeding with manual ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
I ran into this error when I built python 3.8 myself. You will need libffi installed before you build python (assuming that’s what’s going on here).
@tsengr0916 I close this since no update provided. Please reopen if you still have an issue.