pip install -U channels
๋ฅผ ์คํํ ๋ pypi.python.org
์ ๋ํ ์ธ์ฆ์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋ฌธ์ ๊ฐ pip
๋๋ Python 3.6.0
๋๋ ๋ค๋ฅธ ๊ฒ๊ณผ ๊ด๋ จ๋ ๊ฒ์ธ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๋ค์ ์ ์์ ์๋ํ์ง๋ง ๊ทธ ์ค ์๋ฌด ๊ฒ๋ ํจ๊ณผ๊ฐ ์์์ต๋๋ค.
pip --trusted-host pypi.python.org install -U channels
export PIP_CERT=/Users/user/Desktop/certificate_which_i_obtained_from_pypi_dot_python_dot_org.crt
pip install -U channels
๋ค์ cacert.pem
์ curl
์ ์ธ์ฆ์์
๋๋ค.
pip --cert /Users/user/cacert.pem install -U channels
๋ํ ์ด ๋ฌธ์ ๊ฐ Python 3.6.0๊ณผ ๊ด๋ จ์ด ์์ ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋ค์ ์ถ๋ ฅ์ ๊ณ ๋ คํ๊ธฐ ๋๋ฌธ์ ๋๋ค.
user<strong i="25">@host</strong>:~$ python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> context = ssl.create_default_context()
>>> context.cert_store_stats()
{'x509': 0, 'crl': 0, 'x509_ca': 0}
>>> context.get_ca_certs()
[]
>>>
(virtualenv) user<strong i="29">@host</strong>:~/Documents/virtualenv$ pip install -U channels
Collecting channels
Using cached channels-0.17.3-py2.py3-none-any.whl
Collecting asgiref>=0.13 (from channels)
Using cached asgiref-1.0.0-py2.py3-none-any.whl
Collecting daphne>=0.14.1 (from channels)
Using cached daphne-0.15.0-py2.py3-none-any.whl
Requirement already up-to-date: Django>=1.8 in ./lib/python3.6/site-packages (from channels)
Collecting six (from asgiref>=0.13->channels)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting twisted>=16.0 (from daphne>=0.14.1->channels)
Using cached Twisted-16.6.0.tar.bz2
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'incremental' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
No local packages or working download links found for incremental>=16.10.1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/45/r4yr9bbj29dfbtxqv75_785m0000gn/T/pip-build-02d49zb3/twisted/setup.py", line 21, in <module>
setuptools.setup(**_setup["getSetupArgs"]())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/setuptools/dist.py", line 316, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/setuptools/dist.py", line 371, in fetch_build_eggs
replace_conflicting=True,
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 846, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1118, in best_match
return self.obtain(req, installer)
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1130, in obtain
return installer(requirement)
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/setuptools/dist.py", line 439, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/user/Documents/virtualenv/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 668, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/45/r4yr9bbj29dfbtxqv75_785m0000gn/T/pip-build-02d49zb3/twisted/
(virtualenv) user<strong i="30">@host</strong>:~/Documents/virtualenv$
๋๋์ด ๋ฌธ์ ๊ฐ ์์๋ค.
๋ฌธ์ ๋ Python 3.6.0์ ๋น๋ํ ๋ ssl ๋ชจ๋์ด ํ์ฑํ๋์ง ์์๊ธฐ ๋๋ฌธ์ ๋ฐ์ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
Python-3.6.0/Modules/Setup์์ 209-212 ํ์ ์ฃผ์ ์ฒ๋ฆฌ๋ฅผ ์ ๊ฑฐํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค.
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
libssl-dev
๊ฐ ์ค์น๋์ด ์๋์ง ํ์ธํ์ญ์์ค(์ด์จ๋ ์ด๊ฒ์ ๋ฐ๋น์์ฉ ํจํค์ง์
๋๋ค).
์๋ฃ๋๋ฉด ./configure
, make
๋ฐ make install
๋ฅผ ๋ค์ ์ํํ๋ฉด ์๋ํฉ๋๋ค.
Python 3.5, ์ต์ OSX์์ ๋๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
$ pip install pip --upgrade
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720) - skipping
์ ๋ขฐํ ์ ์๋ ํธ์คํธ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ ์์ ํ์ต๋๋ค.
$ pip install --trusted-host pypi.python.org pip --upgrade
Requirement already up-to-date: pip in ./venv/lib/python3.5/site-packages
๋๋ --trusted-host
๋ฅผ ์์ ์ด๋ผ๊ณ ๋ถ๋ฅด์ง ์์ ๊ฒ์
๋๋ค. ๊ธฐ๊ปํด์ผ ์ํํ ํด๊ฒฐ ๋ฐฉ๋ฒ์
๋๋ค. TLS ํ์ธ์ ๋นํ์ฑํํ๊ณ ์ปดํจํฐ๋ฅผ ๋ฉ์์ง ๊ฐ๋ก์ฑ๊ธฐ ๊ณต๊ฒฉ์ ๋
ธ์ถ์ํต๋๋ค. ์ต์
์ --bypass-insecure-host
๋๋ ์ด์ ์ ์ฌํ ์ด๋ฆ์ด์ด์ผ ํฉ๋๋ค.
์ฌ๊ธฐ์ ๋ฌธ์ ๋ setuptools๊ฐ pip๊ฐ ์๋ PyPI์ ํต์ ํ๋ ค๊ณ ํ๊ณ macOS์ 3.6.0์ ๊ธฐ๋ณธ์ ์ผ๋ก CA ๋ฒ๋ค์ ์ก์ธ์คํ ์ ์์ผ๋ฉฐ setuptools๋ pip์ฒ๋ผ ๋ฒ๋ค์ ๋ฒ๋คํ์ง ์๋๋ค๋ ๊ฒ์ ๋๋ค. certifi์ ๊ฐ์ ๊ฒ์ ์ค์นํ๊ฑฐ๋ setuptools์ ๋ฌธ์ ๋ฅผ ์ ๊ธฐํด์ผ ํฉ๋๋ค.
ํ ์ค์น ์ฆ๋ถ
๋น์ ์ ์์ ์ ๋๋ค @CallenChen
๊ทธ๋๋ ์๋๋ค์ ๋์์ฃผ์ธ์...
C:\Windows\system32>pip ์ค์น ์ฆ๋ถ
์ฆ๋ถ ์์ง
URL https://pypi.python.org/simple/incremental/์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค: SSL ์ธ์ฆ์๋ฅผ ํ์ธํ๋ ๋ฐ ๋ฌธ์ ๊ฐ ์์์ต๋๋ค: [SSL: CERTIFICATE_VERIFY_FAILED] ์ธ์ฆ์ ํ์ธ ์คํจ(_ssl.c:748) - ๊ฑด๋๋ฐ๊ธฐ
์ฆ๋ถ ์๊ตฌ ์ฌํญ์ ์ถฉ์กฑํ๋ ๋ฒ์ ์ ์ฐพ์ ์ ์์ต๋๋ค(๋ฒ์ : ).
์ฆ๋ถ์ ๋ํด ์ผ์นํ๋ ๋ถํฌ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
OSX์์ macport๋ฅผ ์ฌ์ฉํ์ฌ curl-ca-bundle์ ์ค์นํ๋ฉด ํด๊ฒฐ๋ฉ๋๋ค.
sudo ํฌํธ ์ค์น curl-ca-bundle
์์กฐ ์
๋ฐ์ดํธ
์์กฐ ์ ๊ฑฐ openssl
์์กฐ ์ค์น openssl
echo '๋ด๋ณด๋ด๊ธฐ PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
์ฌ๊ธฐ์ ์ธ๊ธ๋ ๋๋ก certifi๋ฅผ ์ค์นํ๋
pip install certifi
@gitanupam ์ธ์ฆ์ ์ค์น๊ฐ ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค.
์ด๋ค ์๋ฃจ์ ๋ ๋๋ฅผ ์ํด ์ผํ์ง ์์์ต๋๋ค. ๋๋ OSX์์์ด
get-pip.py๋ฅผ ์ฌ์ฉํ์ฌ ์ ๋ฒ์ ์ pip๋ฅผ ์ง์ ์ค์นํด ๋ณด์ญ์์ค(https://pip.pypa.io/en/stable/installing/ ์ฐธ์กฐ).
$ curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py
$ sudo python get-pip.py
(@pradyunsg ํ์)
@ sdk21 ์ด๊ฒ์ ์ ์๊ฒ ํจ๊ณผ์ ์ ๋๋ค. ๊ณ ๋ง์
์ด์ ๋ ๋ชจ๋ฅด๊ฒ ์ง๋ง Pypi๊ฐ ๋ ์ด์ http ์ฐ๊ฒฐ์ ํ์ฉํ์ง ์๊ธฐ ๋๋ฌธ์ผ ์ ์์ต๋๋ค. ํ์ง๋ง ๋ฏธ๋ฌ๋ฅผ ๋ณ๊ฒฝํ๋ฉด ์ ์๊ฒ ํจ๊ณผ์ ์ ๋๋ค.
$ cat ~/.config/pip/pip.conf
[global]
proxy = http://my-proxy:8080
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
PyPI๋ HTTP ์ฐ๊ฒฐ์ ์๋ฝํ์ง๋ง ์ต๊ทผ์ TLS v1.0 ๋ฐ v1.1์ ๋ํ ์ง์์ ์ค๋จํ์ต๋๋ค. https://stackoverflow.com/a/49769015/1526703 ์ฐธ์กฐ
์ค๋ช ๊ฐ์ฌํฉ๋๋ค, @gitanupam
@sdk21 ๊ฐ์ฌํฉ๋๋ค! ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์๋ํฉ๋๋ค!
@ sdk21 ์ด๊ฒ์ ๋๋ฅผ ์ํด ์๋ํฉ๋๋ค. ๊ฐ์ฌ ํด์!
@ sdk21 ์ด๊ฒ์ ๋๋ฅผ ์ํด ์๋ํฉ๋๋ค. ๊ฐ์ฌ ํด์!
@dk21๋ ๋๋ถ์ ํด๊ฒฐํ์ต๋๋ค...
Mac์์ ๋๋ ์ด๊ฒ์ํ๊ณ ๋ง์นจ๋ด ํด๊ฒฐํ์ต๋๋ค.
https://pip.readthedocs.io/en/stable/installing/
@sdk21 ๊ฐ์ฌํฉ๋๋ค ๐
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
get-pip.py๋ฅผ ์ฌ์ฉํ์ฌ ์ ๋ฒ์ ์ pip๋ฅผ ์ง์ ์ค์นํด ๋ณด์ญ์์ค(https://pip.pypa.io/en/stable/installing/ ์ฐธ์กฐ).
(@pradyunsg ํ์)