Python Openpyxl Pip安装错误:命令出错

Python Openpyxl Pip安装错误:命令出错,python,python-3.x,pip,openpyxl,Python,Python 3.x,Pip,Openpyxl,在尝试安装openpyxl时,我继续收到以下错误: pip install openpyxl Collecting openpyxl Using cached openpyxl-3.0.3.tar.gz (172 kB) ERROR: Command errored out with exit status 1: command: /home/bigdata/scripts/bin/python3.8 -c 'import sys, setuptools, tokenize

在尝试安装openpyxl时,我继续收到以下错误:

pip install openpyxl
Collecting openpyxl
  Using cached openpyxl-3.0.3.tar.gz (172 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bigdata/scripts/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eztesmv9/openpyxl/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eztesmv9/openpyxl/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-install-eztesmv9/openpyxl/pip-egg-info
         cwd: /tmp/pip-install-eztesmv9/openpyxl/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/__init__.py", line 20, in <module>
        from setuptools.dist import Distribution, Feature
      File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/dist.py", line 36, in <module>
        from setuptools import windows_support
      File "/home/bigdata/scripts/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/home/bigdata/lib/python3.8/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.
他们每一个人都回来了:

Requirement already up-to-date: setuptools in /home/bigdata/scripts/lib/python3.8/site-packages (45.1.0)

我错过什么了吗?我们刚刚将我们的帐户迁移到一个A2托管VPS服务器,我对大部分设置都不熟悉。非常感谢您的帮助。

根据phd的提示,我可以通过重新安装python来解决此问题。

pip--version返回了什么?看起来您的python 3.8安装已中断(不完整)。如何将其安装到
/home/bigdata/scripts/lib/python3.8
?你是从资料来源编译的吗?在这种情况下,您需要启用
ctypes
module.Pip版本返回:Pip 20.0.2 from/home/bigdata/scripts/lib/python3.8/site-packages/Pip(python 3.8)我按照主机在以下位置给我的说明安装了python:
Requirement already up-to-date: setuptools in /home/bigdata/scripts/lib/python3.8/site-packages (45.1.0)