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.
Dimenticate I ha detto qualcosa. 'stdout = STDOUT' non ha senso e il comportamento che volevo ottenere è il default. Mi dispiace, non posso aiutare. – delnan