Задать вопрос
@anton13ms

Как установить пакет Flask для Python 3.8.2, на сервер не имеющий доступ к интернету?

Помогите установить пакет Flask для Python 3.8.2, на сервер не имеющий доступ к интернету РЕД ОС.
Установка Flask
[anton@salt getting_webhooks]$ python3 -m pip install /tmp/flask-3.0.0.tar.gz
Processing /tmp/flask-3.0.0.tar.gz
 Installing build dependencies ... error
 ERROR: Complete output from command /usr/bin/python3 /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gaxizsg7/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'flit_core<4':
 ERROR: Collecting flit_core<4
   WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4315e6bfa0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flit-core/
   WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4315e03d30>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flit-core/
   WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4315db5880>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flit-core/
   WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4315dcf250>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flit-core/
   WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4315dcf790>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/flit-core/
   ERROR: Could not find a version that satisfies the requirement flit_core<4 (from versions: none)
 ERROR: No matching distribution found for flit_core<4
 ----------------------------------------
ERROR: Command "/usr/bin/python3 /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-gaxizsg7/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'flit_core<4'" failed with error code 1 in None


Попробовал установить flit_core:

[anton@salt getting_webhooks]$ python3 -m pip install /tmp/flit_core-3.9.0.tar.gz Processing /tmp/flit_core-3.9.0.tar.gz Getting requirements to build wheel ... done ERROR: Exception: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 178, in main status = self.run(options, args) File "/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 376, in run resolver.resolve(requirement_set) File "/usr/lib/python3.8/site-packages/pip/_internal/resolve.py", line 131, in resolve self._resolve_one(requirement_set, req) File "/usr/lib/python3.8/site-packages/pip/_internal/resolve.py", line 296, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/lib/python3.8/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement( File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 362, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 169, in prep_for_dist self.install_backend_dependencies(finder=finder) File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies reqs = req.pep517_backend.get_requires_for_build_wheel() File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 70, in get_requires_for_build_wheel return self._call_hook('get_requires_for_build_wheel', { File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook raise BackendUnavailable pip._vendor.pep517.wrappers.BackendUnavailable



Не понимаю, на что указывает последняя ошибка? Вроде собрать не может пакет, но по какой причине...
  • Вопрос задан
  • 444 просмотра
Подписаться 3 Простой Комментировать
Пригласить эксперта
Ответы на вопрос 2
fenrir1121
@fenrir1121
Начни с документации
В вашем архиве нет зависимостей. В документации описано как собрать в колесо.
Ответ написан
2ord
@2ord
Собери образ Докера на машине с интернетом, посмотри какие зависимости устанавливаются и куда. Собери все файлы и экспортируй в архив TAR.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы