2013-08-19 17 views
5

Sto cercando di installare setuptools su Windows.
La documentazione dice che dovrei eseguire ez_setup.py.
Così ho fatto e ottengo il seguente output:Python installa setuptools, ez_setup.py error

Extracting in c:\users\ut601039\appdata\local\temp\tmpf6a2mb 
Now working in c:\users\ut601039\appdata\local\temp\tmpf6a2mb\setuptools-1.0 
Installing Setuptools 
Something went wrong during the installation. 
See the error message above. 

Traceback (most recent call last): 
    File "D:\Python\Setuptools\ez_setup.py", line 357, in <module> 
    sys.exit(main()) 
SystemExit: 2 

Il messaggio di errore non è molto istruttiva. Guardando nel codice che ho trovato:

 if not _python_cmd('setup.py', 'install', *install_args): 
      log.warn('Something went wrong during the installation.') 
      log.warn('See the error message above.') 
      # exitcode will be 2 
      return 2 

sono andato a _python_cmd() e trovati:

def _python_cmd(*args): 
args = (sys.executable,) + args 
return subprocess.call(args) == 0 

ho scoperto che subprocess.call(args) restituisce 1 anziché il previsto 0.

+0

Dimenticate I ha detto qualcosa. 'stdout = STDOUT' non ha senso e il comportamento che volevo ottenere è il default. Mi dispiace, non posso aiutare. – delnan

risposta

11

come stai tentando di eseguire & installarlo? idealmente .. eseguire cmd poi cd alla cartella estratta & run python setup.py install questo dovrebbe installarlo .. se siete su 64 bit di Windows a 64 bit con python allora avete bisogno di ottenere la versione appropriata può essere trovato qui: (http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools)

+0

Sì, ho finito per installarlo in un modo simile a quello che dici. La documentazione non menziona nessuno di questi dettagli. Grazie. –

+1

hmm .. molto bene, i moduli stessi non ce l'hanno documentato comunque ** python docs ** è documentato su come installare i moduli python; che ho trovato qui: [python docs] (https://docs.python.org/2.7/install/index.html) –

Problemi correlati