728x90
Anaconda 환경에서 virtualenv 를 통해 가상환경 셋팅시 다음과 같은 오류가 발생하는 경우가 있다.
OSError : setuptools pip wheel failed with error code 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # virtualenv envpokemongo New python executable in /root/envpokemongo/bin/python Installing setuptools, pip, wheel... Complete output from command /root/envpokemongo/bin/python - setuptools pip wheel: Traceback (most recent call last): File "<stdin>", line 7, in <module> File "/root/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 21, in <module> File "/root/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/requests/__init__.py", line 62, in <module> File "/root/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-9.0.1-py2.py3-none-any.whl/pip/_vendor/requests/packages/__init__.py", line 29, in <module> ImportError: No module named urllib3 ---------------------------------------- ...Installing setuptools, pip, wheel...done. Traceback (most recent call last): File "/root/anaconda/bin/virtualenv", line 11, in <module> sys.exit(main()) File "/root/anaconda/lib/python2.7/site-packages/virtualenv.py", line 713, in main symlink=options.symlink) File "/root/anaconda/lib/python2.7/site-packages/virtualenv.py", line 945, in create_environment download=download, File "/root/anaconda/lib/python2.7/site-packages/virtualenv.py", line 901, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/root/anaconda/lib/python2.7/site-packages/virtualenv.py", line 797, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /root/envpokemongo/bin/python - setuptools pip wheel failed with error code 1 | cs |
이 경우 pip install virtualenv 아니라 conda install virtualenv 를 통해서 설치한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | # conda install virtualenv Fetching package metadata: .... Solving package specifications: . Package plan for installation in environment /root/anaconda: The following packages will be downloaded: package | build ---------------------------|----------------- conda-env-2.6.0 | 0 502 B libffi-3.2.1 | 1 38 KB enum34-1.1.6 | py27_0 53 KB idna-2.2 | py27_0 122 KB ipaddress-1.0.18 | py27_0 31 KB pyasn1-0.2.3 | py27_0 75 KB pycosat-0.6.2 | py27_0 194 KB pycparser-2.17 | py27_0 153 KB cffi-1.9.1 | py27_0 325 KB requests-2.13.0 | py27_0 776 KB ruamel_yaml-0.11.14 | py27_1 361 KB virtualenv-15.1.0 | py27_0 1.8 MB cryptography-1.7.1 | py27_0 848 KB pyopenssl-16.2.0 | py27_0 68 KB conda-4.3.16 | py27_0 486 KB ------------------------------------------------------------ Total: 5.2 MB The following NEW packages will be INSTALLED: ruamel_yaml: 0.11.14-py27_1 virtualenv: 15.1.0-py27_0 The following packages will be UPDATED: cffi: 1.1.0-py27_0 --> 1.9.1-py27_0 conda: 3.17.0-py27_0 --> 4.3.16-py27_0 conda-env: 2.4.2-py27_0 --> 2.6.0-0 cryptography: 0.9.1-py27_0 --> 1.7.1-py27_0 enum34: 1.0.4-py27_0 --> 1.1.6-py27_0 idna: 2.0-py27_0 --> 2.2-py27_0 ipaddress: 1.0.7-py27_0 --> 1.0.18-py27_0 libffi: 3.0.13-0 --> 3.2.1-1 openssl: 1.0.1k-1 --> 1.0.2k-1 pip: 7.1.2-py27_0 --> 9.0.1-py27_1 pyasn1: 0.1.7-py27_0 --> 0.2.3-py27_0 pycosat: 0.6.1-py27_0 --> 0.6.2-py27_0 pycparser: 2.14-py27_0 --> 2.17-py27_0 pyopenssl: 0.15.1-py27_1 --> 16.2.0-py27_0 python: 2.7.10-1 --> 2.7.13-0 requests: 2.7.0-py27_0 --> 2.13.0-py27_0 setuptools: 18.3.2-py27_0 --> 27.2.0-py27_0 six: 1.9.0-py27_0 --> 1.10.0-py27_0 sqlite: 3.8.4.1-1 --> 3.13.0-0 wheel: 0.26.0-py27_1 --> 0.29.0-py27_0 zlib: 1.2.8-0 --> 1.2.8-3 Proceed ([y]/n)? y Fetching packages ... conda-env-2.6. 100% |###################################################| Time: 0:00:00 449.81 kB/s libffi-3.2.1-1 100% |###################################################| Time: 0:00:00 11.07 MB/s enum34-1.1.6-p 100% |###################################################| Time: 0:00:00 16.17 MB/s idna-2.2-py27_ 100% |###################################################| Time: 0:00:00 11.63 MB/s ipaddress-1.0. 100% |###################################################| Time: 0:00:00 11.02 MB/s pyasn1-0.2.3-p 100% |###################################################| Time: 0:00:00 9.34 MB/s pycosat-0.6.2- 100% |###################################################| Time: 0:00:00 16.57 MB/s pycparser-2.17 100% |###################################################| Time: 0:00:00 9.39 MB/s cffi-1.9.1-py2 100% |###################################################| Time: 0:00:00 10.35 MB/s requests-2.13. 100% |###################################################| Time: 0:00:00 17.43 MB/s ruamel_yaml-0. 100% |###################################################| Time: 0:00:00 13.27 MB/s virtualenv-15. 100% |###################################################| Time: 0:00:00 19.48 MB/s cryptography-1 100% |###################################################| Time: 0:00:00 18.03 MB/s pyopenssl-16.2 100% |###################################################| Time: 0:00:00 14.74 MB/s conda-4.3.16-p 100% |###################################################| Time: 0:00:00 12.78 MB/s Extracting packages ... [ COMPLETE ]|######################################################################| 100% Unlinking packages ... [ COMPLETE ]|######################################################################| 100% Linking packages ... [ COMPLETE ]|######################################################################| 100% # virtualenv envpokemongo New python executable in /root/envpokemongo/bin/python copying /root/anaconda/bin/python => /root/envpokemongo/bin/python copying /root/anaconda/bin/../lib/libpython2.7.so.1.0 => /root/envpokemongo/lib/libpython2.7.so.1.0 Installing setuptools, pip, wheel...done. | cs |
1 2 3 4 5 6 7 8 | # source envpokemongo/bin/activate (envpokemongo) root@localhost:~# ^C (envpokemongo) root@localhost:~# which virtualenv /root/anaconda/bin/virtualenv (envpokemongo) root@localhost:~# which python /root/envpokemongo/bin/python (envpokemongo) root@localhost:~# python -V Python 2.7.13 :: Continuum Analytics, Inc. | cs |
728x90
'프로그래밍 Programming' 카테고리의 다른 글
리스프 리스트 데이터 타입 Common Lisp: LIST - the most versatile data type (2) (0) | 2017.04.24 |
---|---|
리스프 리스트 데이터 타입 Common Lisp: LIST - the most versatile data type (1) (0) | 2017.04.22 |
conda vs. pip vs. virtualenv (0) | 2017.04.13 |
장고 사이트에 reCAPTCHA 넣기 Add reCAPTCHA to Django site (0) | 2017.04.10 |
Django와 Handsontable.js를 이용한 엑셀풍의 입력화면 만들기 (0) | 2017.03.30 |