在anaconda下安裝scrapy庫時,報了CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/twisted-19.2.0-py37he774522_0.tar.bz2>這個錯誤,查找到了大佬的帖子:https://blog.csdn.net/ling_xiobai/article/details/78659981成功安裝好了。
具體報錯如下:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/win-64/repodata.json.bz2 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x00000247EB8CC1D0>, 'Connection to repo.continuum.io timed out. (connect timeout=9.15)'))",),)
配置了清華大學的鏡像:
(base) C:\Users\Lenovo>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ (base) C:\Lenovo>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ (base) C:\Users\Lenovo>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ (base) C:\Users\Lenovo>conda config --set show_channel_urls yes
注意是一句一句地執行,並且這個配置過程沒有結果輸出的(不要以為自己錯了).
最終測試:
D:\Anaconda) C:\Users\Jackko\Documents>conda create -n jackko-regression python=2