asdf-community / asdf-community/asdf-python

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

Open
#113 4 comments 11 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
729
Forks
65
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.