通过Nexus Repo Manager安装Python库时出错

时间:2019-06-20 15:57:50

标签: python-3.x pip

我目前正在尝试安装两个库。

运行:C:\Users\J39304\Desktop>python -m pip install pyinstaller产生以下错误:

>     C:\Users\jerry\Desktop>python -m pip install pyinstaller
>     Looking in indexes: https://repo-manager-location-proprietarysimple
>     Collecting pyinstaller
>     
>     
>       Using cached https://repo-manager-location-proprietarypackages/03/32/hash/PyInstaller-3.4.tar.gz
>     
>     
>       Installing build dependencies ... error
>       ERROR: Complete output from command 'C:\Python35-32\python.exe' 'C:\Python35-32\lib\site-packages\pip' install --ignore-installed
> --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel:
>       
>     
>     ERROR: Traceback (most recent call last):
>         File "C:\Python35-32\lib\runpy.py", line 170, in _run_module_as_main
>           "__main__", mod_spec)
>         File "C:\Python35-32\lib\runpy.py", line 85, in _run_code
>           exec(code, run_globals)
>         File "C:\Python35-32\lib\site-packages\pip\__main__.py", line 16, in <module>
>           from pip._internal import main as _main  # isort:skip # noqa
>         File "C:\Python35-32\lib\site-packages\pip\_internal\__init__.py", line 40,
> in <module>
>           from pip._internal.cli.autocompletion import autocomplete
>         File "C:\Python35-32\lib\site-packages\pip\_internal\cli\autocompletion.py",
> line 8, in <module>
>           from pip._internal.cli.main_parser import create_main_parser
>         File "C:\Python35-32\lib\site-packages\pip\_internal\cli\main_parser.py",
> line 12, in <module>
>           from pip._internal.commands import (
>         File "C:\Python35-32\lib\site-packages\pip\_internal\commands\__init__.py",
> line 6, in <module>
>           from pip._internal.commands.completion import CompletionCommand
>         File "C:\Python35-32\lib\site-packages\pip\_internal\commands\completion.py",
> line 6, in <module>
>           from pip._internal.cli.base_command import Command
>         File "C:\Python35-32\lib\site-packages\pip\_internal\cli\base_command.py",
> line 25, in <module>
>           from pip._internal.index import PackageFinder
>         File "C:\Python35-32\lib\site-packages\pip\_internal\index.py", line 41, in
> <module>
>           from pip._internal.wheel import Wheel
>         File "C:\Python35-32\lib\site-packages\pip\_internal\wheel.py", line 7, in
> <module>
>           import compileall
>         File "C:\Python35-32\lib\compileall.py", line 20, in <module>
>           from concurrent.futures import ProcessPoolExecutor
>         File "C:\Python35-32\lib\site-packages\concurrent\futures\__init__.py",
> line 8, in <module>
>           from concurrent.futures._base import (FIRST_COMPLETED,
>         File "C:\Python35-32\lib\site-packages\concurrent\futures\_base.py", line
> 414
>           raise exception_type, self._exception, self._traceback
>                               ^
>       SyntaxError: invalid syntax
>       ----------------------------------------
>     ERROR: 
>     Command "'C:\Python35-32\python.exe' 
>     'C:\Python35-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\jerry\AppData\Local\Temp\pip-build-env-a6x0i3h0\overlay'
> --no-warn-script-location --no-binary :none: --only-binary :none: -i https://repo-manager-location-proprietarysimple -- setuptools wheel"
> failed with error code 1 in None

我还注意到,运行类似的命令C:\Users\J39304\Desktop>python -m pip install auto-py-to-exe会导致完全相同的错误。

但是,当我运行C:\Users\J39304\Desktop>python -m pip install keras时,它安装得很好。

我已经通过运行pip来确保我正在使用最新版本的python -m pip install --upgrade pip

我没有找到有关此错误的任何资源。

1 个答案:

答案 0 :(得分:1)

raise X, Y是仅限Python2的语法。您已经设法以某种方式将仅Python2的库安装到Python3 site-packages。您需要清理site-packages并安装新版本的库。