background

Python3.7 uses Async as the keyword, causing an error in installing PySpider

The installation process

Pyenv manages multiple Versions of Python

github.com/pyenv/pyenv

mac

brew update
brew install pyenv
Copy the code

windows

Github.com/pyenv-win/p…

  • Download https://github.com/pyenv-win/pyenv-win/archive/master.zip
  • Unzip to the user directory: %USERPROFILE%/.pyenv/pyenv-win
  • Add to the environment variable Path: %USERPROFILE%.pyenv\pyenv-win\bin; %USERPROFILE%.pyenv\pyenv-win\shims
  • Check: pyenv –version

Install python3.6.8

  • Python3.6.8: Pyenv install 3.6.8
  • Pyenv local 3.6.8 (Pyenv Global 3.6.8)
  • Check the Python version: python -v

Install pycurl

windows

pip uninstall pycurl
set PYCURL_SSL_LIBRARY=openssl
pip install pycurl
Copy the code

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
Copy the code

Install pyspider

pip install pyspider
Copy the code

Problem solving

– Deprecated option ‘domaincontroller’: use ‘http_authenticator.domain_controller’ instead.

  • Solution:
PIP uninstall wsgidav PIP install WSgidav ==2.4.1Copy the code

Install PySpider on Conda in Windows

  • Install python3.6
Conda create --name py36 python=3.6.8Copy the code
  • Activate the PY36 environment
activate py36
# note: This must be in the conda CMD environment
Copy the code
  • Install pycurl
conda install pycurl
Copy the code
  • Install pyspider
pip install pyspider
# note: be sure to use python3.6
Copy the code
  • Problem solving

Deprecated option ‘domainController ‘: use ‘http_authenticator.domain_controller’ instead

PIP uninstall wsgidav PIP install WSgidav ==2.4.1Copy the code

ModuleNotFoundError: No module named ‘mysql’

pip install mysql-connector-python
Copy the code
  • run
pyspider
Copy the code

Solve some problems in installing PySpider