Ошибка при установке пакета Python -saml в windows - PullRequest
6 голосов
/ 22 апреля 2020

Я хотел бы использовать python -saml для интеграции с веб-приложением flask. в то время как я пытаюсь установить пакет python -saml, используя pip install python-saml, я получаю следующее сообщение об ошибке.

(myvenv) C:\Users\sekar>pip install python3-saml==1.9.0
Collecting python3-saml==1.9.0
  Using cached python3_saml-1.9.0-py3-none-any.whl (72 kB)
Collecting xmlsec>=0.6.0
  Using cached xmlsec-1.3.3.tar.gz (29 kB)
Building wheels for collected packages: xmlsec
  Building wheel for xmlsec (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sekar\AppData\Local\Temp\16\pip-wheel-39e4ydgb'
       cwd: C:\Users\sekar\AppData\Local\Temp\16\pip-install-9x0le85b\xmlsec\
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_ext
  error: HTTP Error 404: The specified blob does not exist.
  Retrieving "https://ci.appveyor.com/api/buildjobs/hij3a6776pdv2007/artifacts/libxml2-2.9.4.win64.zip" to "build/extra\libxml2-2.9.4.win64.zip"
  ----------------------------------------
  ERROR: Failed building wheel for xmlsec
  Running setup.py clean for xmlsec
Failed to build xmlsec
Installing collected packages: xmlsec, python3-saml
    Running setup.py install for xmlsec ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\sekar\AppData\Local\Temp\16\pip-record-l_q25m6k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\Include\xmlsec'
         cwd: C:\Users\sekar\AppData\Local\Temp\16\pip-install-9x0le85b\xmlsec\
    Complete output (5 lines):
    running install
    running build
    running build_ext
    error: HTTP Error 404: The specified blob does not exist.
    Retrieving "https://ci.appveyor.com/api/buildjobs/hij3a6776pdv2007/artifacts/libxml2-2.9.4.win64.zip" to "build/extra\libxml2-2.9.4.win64.zip"
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"'; __file__='"'"'C:\\Users\\sekar\\AppData\\Local\\Temp\\16\\pip-install-9x0le85b\\xmlsec\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\sekar\AppData\Local\Temp\16\pip-record-l_q25m6k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\sekar\AppData\Local\conda\conda\envs\myvenv\Include\xmlsec' Check the logs for full command output.

Я пробовал с conda install python-saml, та же ошибка, и они остановили этот пакет 2 года перед. даже я пытался python3-saml

основная проблема в пакете xmlse c ..

есть ли какие-либо каналы conda или PYPI предоставляют этот пакет?

Ответы [ 2 ]

2 голосов
/ 27 апреля 2020

Я восстановил xmlsec windows колеса и загрузил их на страницу релизов моей вилки . Для установки сначала установите xmlsec, передав дополнительный индекс PyPI:

$ pip install xmlsec --extra-index-url=https://hoefling.io/pypi

Добавленный индекс просто прокси-запрос на установку в выпусках Github.

Теперь установите python3-saml:

$ pip install python3-saml

(Альтернатива) Выбор dist вручную

Вы можете вручную найти колесо, соответствующее вашей установке Python, на странице release и установить его по прямой ссылке, например

$ python -c "from pip._internal.pep425tags import get_supported; print(*get_supported()[0], sep='-')"
cp37-cp37m-win_amd64
# the matching wheel is thus xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl
$ pip install https://github.com/hoefling/xmlsec/releases/download/1.3.6.post1/xmlsec-1.3.6.post1-cp37-cp37m-win_amd64.whl

(Необязательно) Проверьте, что xmlsec работает, вызвав тесты

Я выполнил тесты для всех встроенных колес (см. этот журнал заданий на Appveyor ), но вы также можете запустить тесты локально, чтобы убедиться, что xmlsec установка работает:

$ git clone https://github.com/mehcode/python-xmlsec.git && cd python-xmlsec
$ pip install pytest
$ pytest tests/
1 голос
/ 25 апреля 2020

Никогда не использовал python -saml здесь ... Однако при поиске этой ошибки я обнаружил следующие проблемы GitHub: Проблема 1 и Проблема 2

Они оба говорят о проблеме с dm.xmlse c .binding.

Best,
Felipe

...