Я пытаюсь установить yfinance «sudo -H pip install yfinance» и продолжаю получать следующую ошибку внизу этого сообщения. Я удалил / установил pip. Я удалил / установил setuptools через pip и попробовал следующие команды:
python3 -m ensurepip --upgrade
Requirement already up-to-date: setuptools in /usr/local/lib/python3.8/site-packages (49.2.0)
Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (20.1.1)
pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (20.1.1)
pip install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/local/lib/python3.8/site-packages (49.2.0)
Python Version
python --version
Python 3.8.3
Pip Version
pip --version
pip 20.1.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
System Update Проверки
sudo apt-get upgrade
sudo apt-get update
Фактический код ошибки ниже, когда я запускаю «sudo -H pip install yfinance»
*****@*******:~/Desktop/Project$ sudo -H pip install yfinance
Collecting yfinance
Using cached yfinance-0.1.54.tar.gz (19 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xpuca0pe/yfinance/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xpuca0pe/yfinance/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-1j4zanh6
cwd: /tmp/pip-install-xpuca0pe/yfinance/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 23, in <module>
from setuptools.dist import Distribution
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/usr/local/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/local/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.
Как исправить эту ошибку?