Python установка пакета через ошибку pip - PullRequest
1 голос
/ 10 апреля 2020

Я пытаюсь установить несколько пакетов python через pip3, но в большинстве из них я получаю ошибки, которые не понимаю. Например:

root@turris:~# pip3 install pyshark
Collecting pyshark
  Downloading pyshark-0.4.2.9-py3-none-any.whl (31 kB)
Collecting py
  Downloading py-1.8.1-py2.py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 1.6 MB/s
Collecting lxml
  Downloading lxml-4.5.0.tar.gz (4.5 MB)
     |████████████████████████████████| 4.5 MB 3.6 MB/s
Installing collected packages: py, lxml, pyshark
    Running setup.py install for lxml ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eln_tufx/lxml/setup.py'"'"'                                                                     ; __file__='"'"'/tmp/pip-install-eln_tufx/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.c                                                                     lose();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-0uhmqqdg/install-record.txt --single-version-externally-managed --compile --insta                                                                     ll-headers /usr/include/python3.6/lxml Check the logs for full command output.

У меня установлено python3 .6 и пункт 20.0.2. Я уже обновил setuptools и руль. Теперь я получаю это:

root@turris:~/skripty# python3.6 -m pip install numpy
Collecting numpy
  Using cached numpy-1.18.2.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 /usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpf_8xl1dr Check the logs for full command output.

Я использую TurrisOS (модифицированный дистрибутив OpenWRT). Кто-нибудь знает, что не так? Спасибо.

РЕДАКТИРОВАТЬ: Хорошо, я исправил ошибку для пакета Pyshark следующим образом:

opkg update
opkg install python3-lxml
pip3 install pyshark

Но я все еще получаю другие ошибки при установке, например numpy.

root@turris:~# pip3 install numpy
Collecting numpy
  Using cached numpy-1.18.2.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6bzl_666 Check the logs for full command output.

Или другой пакет и другая ошибка:

root@turris:~# pip3 install matplotlib
Collecting matplotlib
  Downloading matplotlib-3.2.1.tar.gz (40.3 MB)
     |████████████████████████████████| 40.3 MB 11.3 MB/s
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
...