Для установки есть разные способы.
1. Поставить пакет pip и в терминале набрать "pip install {файл или ссылка библиотеки}".
2. Поставить IDE (например PyCharm) и там в настройках под конкретный проект поставить в терминале с помощью такой же команды.
Эти 2 способа - не одно и то же. 1й способ - для всех проектов по умолчанию.
Так вот часто бывает так, что одним из способов библиотека ставится, а другим почему-то нет.
Сегодня я столкнулся вновь с этим, ставя скачанную библиотеку pandas версии 2.2.2.
[a@lureenvoy ~]$ pip install /home/a/Загрузки/pandas-2.2.2.tar.gz
Defaulting to user installation because normal site-packages is not writeable
Processing ./Загрузки/pandas-2.2.2.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/site-packages (from pandas==2.2.2) (2021.1)
Requirement already satisfied: python-dateutil>=2.8.2 in /usr/lib/python3/site-packages (from pandas==2.2.2) (2.8.2)
Collecting numpy>=1.22.4
Downloading numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.6/18.2 MB 10.1 kB/s eta 0:28:56
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib64/python3/site-packages/pip/_vendor/urllib3/response.py", line 435, in _error_catcher
yield
File "/usr/lib64/python3/site-packages/pip/_vendor/urllib3/response.py", line 516, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/lib64/python3/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 90, in read
data = self.__fp.read(amt)
File "/usr/lib64/python3.9/http/client.py", line 463, in read
n = self.readinto(b)
File "/usr/lib64/python3.9/http/client.py", line 507, in readinto
n = self.fp.readinto(b)
File "/usr/lib64/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.9/ssl.py", line 1275, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.9/ssl.py", line 1133, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
File "/usr/lib64/python3/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
File "/usr/lib64/python3/site-packages/pip/_internal/commands/install.py", line 369, in run
requirement_set = resolver.resolve(
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/resolvers.py", line 373, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/resolvers.py", line 204, in _get_updated_criteria
self._add_to_criteria(criteria, requirement, parent=candidate)
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/usr/lib64/python3/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
return bool(self._sequence)
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
return any(self)
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
super().__init__(
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
self.dist = self._prepare()
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
File "/usr/lib64/python3/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/usr/lib64/python3/site-packages/pip/_internal/operations/prepare.py", line 438, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/usr/lib64/python3/site-packages/pip/_internal/operations/prepare.py", line 483, in _prepare_linked_requirement
local_file = unpack_url(
File "/usr/lib64/python3/site-packages/pip/_internal/operations/prepare.py", line 165, in unpack_url
file = get_http_url(
File "/usr/lib64/python3/site-packages/pip/_internal/operations/prepare.py", line 106, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/usr/lib64/python3/site-packages/pip/_internal/network/download.py", line 147, in __call__
for chunk in chunks:
File "/usr/lib64/python3/site-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar
for chunk in iterable:
File "/usr/lib64/python3/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "/usr/lib64/python3/site-packages/pip/_vendor/urllib3/response.py", line 573, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib64/python3/site-packages/pip/_vendor/urllib3/response.py", line 538, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.9/contextlib.py", line 137, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/lib64/python3/site-packages/pip/_vendor/urllib3/response.py", line 440, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
[a@lureenvoy ~]$
Конечно, по дефолту хотелось бы чтобы такие важные библиотеки и фреймворки (типа Flask, Django, Jupyter и др.) уже были предустановлены (и на уровне юзера, а не проекта).
Но это уже пожелания к разработчикам релиза.