asdf-community / asdf-community/asdf-python

No module named '_ctypes' error for Python 3.7 with Mac Pro M1

Offen
#113 4 Kommentare 11 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
729
Forks
65
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi,

I installed python 3.7.12 with asdf. Then do `pip3 install ansible` throws error

```
Collecting ansible
Using cached ansible-4.6.0.tar.gz (35.6 MB)
ERROR: Command errored out with exit status 1:
command: /Users/jiazhenxie/.asdf/installs/python/3.7.12/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/bm/fm54b4w52kx6w2zhs25qws6c0000gp/T/pip-install-eu4cewr3/ansible/setup.py'"'"'; __file__='"'"'/private/var/folders/bm/fm54b4w52kx6w2zhs25qws6c0000gp/T/pip-install-eu4cewr3/ansible/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/bm/fm54b4w52kx6w2zhs25qws6c0000gp/T/pip-pip-egg-info-p783eyl2
cwd: /private/var/folders/bm/fm54b4w52kx6w2zhs25qws6c0000gp/T/pip-install-eu4cewr3/ansible/
Complete output (11 lines):
Traceback (most recent call last):
File "", line 1, in
File "/Users/jiazhenxie/.asdf/installs/python/3.7.12/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in
from setuptools.dist import Distribution
File "/Users/jiazhenxie/.asdf/installs/python/3.7.12/lib/python3.7/site-packages/setuptools/dist.py", line 34, in
from setuptools import windows_support
File "/Users/jiazhenxie/.asdf/installs/python/3.7.12/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in
import ctypes
File "/Users/jiazhenxie/.asdf/installs/python/3.7.12/lib/python3.7/ctypes/__init__.py", line 7, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```

Is it a known issue with asdf python 3.7?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, die Installation von Python 3.7.12 mit asdf auf einem Mac Pro M1 zu reproduzieren, führe dann `pip3 install ansible` aus und bestätige den Importfehler bei `_ctypes`. Überprüfe den asdf-python-Build-Pfad und die Python-ctypes-Abhängigkeit; die Aufgabe ist abgeschlossen, wenn festgestellt wurde, ob der Plugin-Build dafür verantwortlich ist, und eine verifizierte Behebung oder klare Diagnose dokumentiert wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
operating-systems, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.