简体   繁体   中英

How to install packages on portable python

Good morning,

i'm trying to install a package on portable python. I found that i do not have the easy_install.exe file, I just have the easy_install.py file.

I tried the following from 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

any suggestion?

thanks

The syntax

except ValueError, e:
                     ^
SyntaxError: invalid syntax

is for Python 2. The error is from the file C:\\Software\\Portable Python 3.2.5. 1\\App\\lib\\site-packages\\setuptools\\dist.py C:\\Software\\Portable Python 3.2.5. 1\\App\\lib\\site-packages\\setuptools\\dist.py . It seems you have a wrong version of setuptools installed. You have setuptools for Py2 but you need setuptools for Py3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM