安装Anaconda+Scrapy出现的问题

1.下载Anaconda,用的清华的镜像https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
安装一路next即可
安装Anaconda+Scrapy出现的问题
安装Anaconda+Scrapy出现的问题
第一个勾:是否把Anaconda加入环境变量
第二个勾:是否设置Anaconda所带的Python 3.6为系统默认的Python版本
2.Anaconda安装成功之后,我们需要修改其包管理镜像为国内源。
在cmd总执行下面两行代码即可。
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
3.安装Scrapy
本来直接用命令安装conda install scrapy 可是如下错误

C:\Windows\System32>conda install scrapy
Fetching package metadata .....

CondaHTTPError: HTTP None None for url <https://repo.continuum.io/pkgs/free/win-
64/repodata.json.bz2>
Elapsed: None

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.

ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'repo.continuum.io\', p
ort=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Ca
used by ReadTimeoutError("HTTPSConnectionPool(host=\'repo.continuum.io\', port=4
43): Read timed out. (read timeout=9.15)",))',),)
于是使用命名easy_install scrapy 安装成功,可是在spyder中测试时
import scrapy
出现ModuleNotFoundError: No module named 'twisted错误
又开始百度,安装twisted
该帖说一些不兼容问题,查看自己的scrapy确实没有twisted.于是跟着执行conda install twisted==16.6.0命令
得到和上面一样的错误
然后开始在网上找错误原因,找到一个解决方法
虽然他是更新,但错误一样,于是照着操作
在cmd中 输入命令: conda - -help
找到 .condarc的路径
用记事本打开,把最后一行的-defaults删掉
再执行conda install twisted==16.6.0命令
成功
测试import scrapy成功。。。
其实在安装Scrapy时就可以删掉-defaults,然后安装即可。