2015-10-08 16 views
6

Python 3.5 64bit ile Windows 10 kullanıyorum. Ve pip'ten virtualenv'u yükleyin. Yeni bir sanal ortam yaratmak için çalışırken"Setuptools pipet tekerleği hata kodu 1 ile başarısız oldu" ile sanal ortam oluşturulamıyor

, aşağıdaki günlük başarısız eğilimindedir: --no-setuptools ile yürütmek

> virtualenv env1 

    Using base prefix 'c:\\program files\\python 3.5' 
    New python executable in env1\Scripts\python.exe 
    Installing setuptools, pip, wheel... 
    Complete output from command E:\vp\env1\Scripts\python.exe -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel: 
    Ignoring indexes: https://pypi.python.org/simple 
    Collecting setuptools 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'. 
    Could not find a version that satisfies the requirement setuptools (from versions:) 
    No matching distribution found for setuptools 
    ---------------------------------------- 
    ...Installing setuptools, pip, wheel...done. 
    Traceback (most recent call last): 
    File "c:\program files\python 3.5\lib\runpy.py", line 170, in _run_module_as_main 
     "__main__", mod_spec) 
    File "c:\program files\python 3.5\lib\runpy.py", line 85, in _run_code 
     exec(code, run_globals) 
    File "C:\Program Files\Python 3.5\Scripts\virtualenv.exe\__main__.py", line 9, in <module> 
    File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 832, in main 
     symlink=options.symlink) 
    File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 1004, in create_environment 
     install_wheel(to_install, py_executable, search_dirs) 
    File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 969, in install_wheel 
     'PIP_NO_INDEX': '1' 
    File "c:\program files\python 3.5\lib\site-packages\virtualenv.py", line 910, in call_subprocess 
     % (cmd_desc, proc.returncode)) 
    OSError: Command E:\vp\env1\Scripts\python.exe -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1 

, iyi çalışıyor ve sanal ortam oluşturur.

+2

Virtualenv, yükleme yolunda boşluk olduğunda Python'u sevmez. Benimkini klasik C: \ Python35 konumuna yeniden yükledim ve bu sorunu çözdüm. Bkz. [Yığın Taşımı] (https://stackoverflow.com/a/7911058/4573362). –

+2

@FrederickJansen Düzeltme için teşekkürler. C: \ Python \ Python35 'e yeniden yükledikten sonra, ** virtualenv ** modülü şimdi iyi çalışıyor. –

cevap

0

Benzer ancak farklı bir hata oluştu ve geçerli dizinimde Python dizesi modülünü geçersiz kılan bir modül vardı.

İşte yığın izim. Temel olarak dize modülünün maketrans özniteliğine sahip olmadığına dikkat edin. docs said öyle değildi. Bu, dize modülünde bir şeylerin yanlış olduğunu gösteren büyük bir ipucuydu, bu da beni gereksiz modüller için kontrol etmemi sağladı.

New python executable in ./env/bin/python 
Installing setuptools, pip, wheel... 
    Complete output from command /home/.../env/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel: 
    Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "/usr/local/lib/python2.7/dist-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/__init__.py", line 6, in <module> 
    File "/usr/lib/python2.7/optparse.py", line 77, in <module> 
    import textwrap 
    File "/usr/lib/python2.7/textwrap.py", line 40, in <module> 
    class TextWrapper: 
    File "/usr/lib/python2.7/textwrap.py", line 82, in TextWrapper 
    whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace)) 
AttributeError: 'module' object has no attribute 'maketrans' 
---------------------------------------- 
...Installing setuptools, pip, wheel...done. 
Traceback (most recent call last): 
    File "/usr/local/bin/virtualenv", line 11, in <module> 
    sys.exit(main()) 
    File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 832, in main 
    symlink=options.symlink) 
    File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1004, in create_environment 
    install_wheel(to_install, py_executable, search_dirs) 
    File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 969, in install_wheel 
    'PIP_NO_INDEX': '1' 
    File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 910, in call_subprocess 
    % (cmd_desc, proc.returncode)) 
OSError: Command /home/.../env/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1 
0

Aynı hatayı aldım. Bilgisayarımın yolu 'F: \ 灰尘 \ pathon3.6'. ve senin yolunun 'c: \ program files \ python 3.5' olduğunu buluyorum, 'program dosyalarında' bir boşluk var. işte bu yüzden hata oldu sanırım.Pythonun yolu sanırım, ilk önce ingilizce olmalı, ikincisi herhangi bir yere gerek yok.Hope size yardımcı olur. (İngilizce'ye aldırmayın. Çinli bir çocukum.Teşekkürler 0)