Various difficulties in installing scrapy on mac, macscrapy

Source: Internet
Author: User

Various difficulties in installing scrapy on mac, macscrapy

1. No pip toolkit, install: terminal, wget https://bootstrap.pypa.io/get-pip.py

Install pip: sudo python get-pip.py

2. Modify pip Source Code address (foreign address is too slow)

Mac configuration. pip/pip. conf

 

Mkdir. pip

Touch pip. conf

Vim open pip. conf

Enter:

[Global]

Index-url = http://pypi.douban.com/simple

[Install]

Trusted-host = pypi.douban.com

 

Save pip. conf

3. xcode-select-install

 

Sudo pip install Scrapy

When imortError: cannot import name xmlrpc_client appears during installation:

Terminal:

Sudo rm-rf/Library/Python/2.7/site-packages/six *

Sudo rm-rf/System/Library/Frameworks/Python. framework/Versions/2.7/Extras/lib/python/six *

Sudo pip install six

If a permission problem occurs, it may be caused by the tootless mechanism of OS X.

Restart the computer: command + r, select recovery mode, and choose terminal run csrutil disable in the upper left corner to restart the computer.

Check the scrapy version after installation:

Traceback (most recent call last ):

File "/usr/local/bin/Scrapy", line 7, in <module>

From scrapy. cmdline import execute

File "/Library/Python/2.7/site-packages/scrapy/_ init _. py", line 27, in <module>

From. import _ monkeypatches

File "/Library/Python/2.7/site-packages/scrapy/_ monkeypatches. py", line 2, in <module>

From six. moves import copyreg

ImportError: No module named six. moves

 

For the first time, we thought we had re-installed six if six was not successfully installed. The latest version is 1.10.0.

Check the version of scrapy.

Sudo-H pip install scrapy

Check normal

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.