背景
python3.7将async作为了关键字,导致安装pyspider出错
安装过程
pyenv管理多个Python版本
mac
brew update
brew install pyenv
windows
- 下载https://github.com/pyenv-win/pyenv-win/archive/master.zip
- 解压到用户目录下:%USERPROFILE%/.pyenv/pyenv-win
- 添加到环境变量Path:%USERPROFILE%.pyenv\pyenv-win\bin;%USERPROFILE%.pyenv\pyenv-win\shims
- 检查:pyenv --version
安装python3.6.8
- 安装python3.6.8:pyenv install 3.6.8
- 本地激活:pyenv local 3.6.8(全局激活:pyenv global 3.6.8)
- 检查python版本:python -V
安装pycurl
windows
pip uninstall pycurl
set PYCURL_SSL_LIBRARY=openssl
pip install pycurl
mac
pip uninstall pycurl
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
export PYCURL_SSL_LIBRARY=openssl
pip install pycurl
安装pyspider
pip install pyspider
问题解决
- Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.
- 解决:
pip uninstall wsgidav
pip install wsgidav==2.4.1
windows环境下面安装
- 安装python3.6
conda create --name py36 python=3.6.8
- 激活py36环境
activate py36
注意:一定要在conda的cmd环境下
- 安装pycurl
conda install pycurl
- 安装pyspider
pip install pyspider
# 注意:一定要在python3.6环境下
- 问题解决
- Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.
pip uninstall wsgidav
pip install wsgidav==2.4.1
- 运行
pyspider
评论区