安装 wrapt 时出错

安装 wrapt 时出错

系统信息

OS Platform and Distribution : Ubuntu 20.04
TensorFlow version: 1.15.0
Python version: 3.7.0
Installed using : pip
CUDA/cuDNN version: None
GPU model and memory: CPU

描述问题:

我正在尝试通过 PyCharm 中的终端安装 tensorflow,由于我的 CPU 较旧,无法使用任何其他版本的 python 或 tensorflow。这是我的最后手段,任何较新版本的 tensorflow 都会立即崩溃。问题出在 wrapt 开始安装时。

提供遇到问题之前执行的命令/步骤的确切顺序

pip3 install tensorflow==1.15.0

任何其他信息/日志

pip3 install tensorflow==1.15.0
Defaulting to user installation because normal site-packages is not writeable
Collecting tensorflow==1.15.0
 Downloading tensorflow-1.15.0-cp37-cp37m-manylinux2010_x86_64.whl (412.3 MB)
    |████████████████████████████████| 412.3 MB 21 kB/s 
Collecting six>=1.10.0
 Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting wrapt>=1.11.1
 Downloading wrapt-1.12.1.tar.gz (27 kB)
   ERROR: Command errored out with exit status 1:
    command: /usr/local/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v5_uvp33/wrapt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v5_uvp33/wrapt/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 /tmp/pip-pip-egg-info-gahhrkjb
        cwd: /tmp/pip-install-v5_uvp33/wrapt/
   Complete output (11 lines):
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 23, in <module>
       from setuptools.dist import Distribution
     File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
       from setuptools import windows_support
     File "/usr/local/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
       import ctypes
     File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
       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.

相关内容