如何在便携式python上安装软件包

时间:2018-02-18 21:25:12

标签: python pip failed-installation

早上好,

我试图在便携式python上安装软件包。我发现我没有easy_install.exe文件,我只有easy_install.py文件。

我在prompt_CDOS中尝试了以下内容:

    1)
C:\Software\Portable Python 3.2.5.1>app\py
    thon.exe textract-1.6.1.tar\textract-1.6.1\setup.py
    Traceback (most recent call last):
      File "textract-1.6.1.tar\textract-1.6.1\setup.py", line 4, in <module>
        from setuptools import setup
      File "C:\Software\Portable Python 3.2.5.
    1\app\lib\site-packages\setuptools\__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "C:\Software\Portable Python 3.2.5.
    1\app\lib\site-packages\setuptools\extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "C:\Software\Portable Python 3.2.5.
    1\app\lib\site-packages\setuptools\dist.py", line 103
        except ValueError, e:
                         ^
    SyntaxError: invalid syntax


2)
C:\Software\Portable Python 3.2.5.1>App\py
thon.exe App\easy_install.py textract-1.6.1.tar\textract-1.6.1\setup.py
Traceback (most recent call last):
  File "App\easy_install.py", line 4, in <module>
    from setuptools.command.easy_install import main
  File "C:\Software\Portable Python 3.2.5.
1\App\lib\site-packages\setuptools\__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
  File "C:\Software\Portable Python 3.2.5.
1\App\lib\site-packages\setuptools\extension.py", line 5, in <module>
    from setuptools.dist import _get_unpatched
  File "C:\Software\Portable Python 3.2.5.
1\App\lib\site-packages\setuptools\dist.py", line 103
    except ValueError, e:
                     ^
SyntaxError: invalid syntax

任何建议?

感谢

1 个答案:

答案 0 :(得分:0)

语法

except ValueError, e:
                     ^
SyntaxError: invalid syntax

适用于Python 2.错误来自文件C:\Software\Portable Python 3.2.5. 1\App\lib\site-packages\setuptools\dist.py。您似乎安装了setuptools的错误版本。 Py2有setuptools但Py3需要setuptools