如何在便携式 python 上安装软件包
How to install packages on portable python
早上好,
我正在尝试在便携 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
有什么建议吗?
谢谢
语法
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
。
早上好,
我正在尝试在便携 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
有什么建议吗?
谢谢
语法
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
。