cool hit counter Summary of Scrapy installation methods and common installation problems under Windows - Scrapy installation tutorial_Intefrankly

Summary of Scrapy installation methods and common installation problems under Windows - Scrapy installation tutorial


These days, many friends in the group asked Scrapy installation problems, in fact, the problem aspects are similar, today I give you a compilation of Scrapy installation tutorials, I hope that in the future, other partners in the installation of the time is no longer six, the specific tutorials are as follows.

Scrapy is a framework for Python web crawlers, very good and deeply popular, its workings, in here will not be repeated.

1, normally when we are in the Python library, we just need to use the cmd command to open a command line window, and then type pip install library, you can install it normally, but in the installation of Scrapy, after typing pip install scrapy often encounter the following problem.

2. This problem occurs because we lack the libxml2 installation package. Now once we install this package, we can install scrapy without any problem. I'd like to introduce you to a very useful Python package website, which is amazing and has Python packages specifically for installation under Windows, as shown below.

3, after the site to find lxml, you can also type Ctrl + f to find, after you find the following figure.

4. Click "lxml" and find the lxml installation package, as shown in the following figure. Find the lxml installer that corresponds to your Python version. My computer is 64-bit and the Python version is Python 3.4, so find the installer in the red box below and click on it to download it. Similarly, the other Python 3.5, Python 3.6, and Python 3.7 installers just correspond one to the other according to your situation.

5, then go to the downloaded directory, the lxml for installation can be, enter the installation command pip install lxml-4.2.1-cp34-cp34m-win_amd64.whl can be.

6, lxml-4.2.1-cp34-cp34m-win_amd64.whl environment installation is complete, and then re-type pip install scrapy can be installed smoothly, no more errors will be reported, as shown in the following figure.

7. Type pip list to view the installed scrapy packages, as shown below.

8, after we can use scrapy normally, you can create scrapy projects and so on.

9. Another problem encountered by some of our partners is this.

raise distutils.errors.DistutilsPlatformError(err)

distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": Download the Visual C++ Build Tools (standalone C++ compiler, libraries and tools)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1

This is because the local machine lacks a visual C++ installation environment, so you just need to go tohttp://landinghub.visualstudio.com/visual-cpp-build-tools This site, download the corresponding computer version of visual C++ environment, install it and solve the problem.

This is a large installation package, just wait until scrapy is installed and then delete it.

10, and some partners may encounter the following error prompt "Twisted-18.7.0-cp34-cp34m-win_amd64.whl is not a supported wheel on this platform.

Didn't the previous lxml installer install directly and it worked? Why does this installer have this problem? At this point, you first need to check whether the Python version and computer bit number of the installation package correspond to the local machine, if it is confirmed that there is no problem, and then continue to look at the next.

Here I'll give you a tip that is specifically designed to deal with such problems. Go to the downloaded installation package, here is the Twisted-18.7.0-cp34-cp34m-win_amd64.whl installation package as an example, go to the download directory, usually after downloading put it under the site-packages folder of the virtual environment, er then change the suffix .whl to .zip, change the suffix .whl to .zip, change the suffix .whl to .zip, the important thing to say three times, do you feel familiar with it? Yes, it is a zip file, now extract all the contents of the zip package to the current folder as shown in the image below.

After that, enter the pip list command in the virtual environment to view the installation package and you can see that the Twisted installation package is already inside, as shown in the following image. The first pip list command has not yet unpacked the Twisted installation package, there is no Twisted library at this time; the second pip list command is executed after the Twisted installation package has been unpacked, you can see that the Twisted library is already in there.

Once the Twisted library is installed, installing other libraries such as Scrapy, Pandas, etc. will be a snap.

Here is a list of a few common problems in the Scrapy installation process and their solutions, I hope it will help you when you install Scrapy in the future, maybe everyone's platform and environment are not quite the same, you will certainly encounter other installation problems, welcome to learn and exchange together ~~


Recommended>>
1、The star is out to dine with Zhao Ming or stand for new Honor products
2、Abra CEO Bill Barhydt Trust is the most important part of the payment system and Bitcoin solves the trust problem with blockchain
3、Foreign Jedi players complain I have to learn Chinese to play the game in the South American service
4、2018 National Day Holiday Work Schedule Notice
5、HTC is deep in the red where is the road to blockchain phones

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号