一、安裝wheel
pip install wheel
二、安裝twisted
- 檢視自己對應的版本檔案
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
cp27 : python版本27 win32 / win32_amd64 : 電腦系統是32位/64位

如果不知道自己python版本,控制台輸Python
2.進入前面下載下傳好的wheel檔案夾下
3. 下載下傳對應檔案:pip install Twisted-19.2.1-cp37-cp37m-win32.whl
這裡遇到幾個坑:
(1)Requirement 'Twisted-19.2.1-cp37-cp37m-win_amd64.whl' looks like a filename, but the file does not exist
pycurl‑7.43.1‑cp37‑cp37m‑win_amd64.whl is not a valid wheel filename.
這個檢查你的檔案有沒有寫對,最好的辦法就是直接下載下傳到本地後重命名粘貼複制。
(2)Twisted-19.2.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
這個第一反應是去檢查自己的Python版本,發現版本對啊,沒下錯啊....
懷着試一試的心情去install了32位版本的,emmmmmm,竟然對了,咱也不知道為什麼
(3)
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'D:\\pycharm\\Lib\\site-packages\\wheel\\Twisted-19.2.1-cp37-cp37m-win32.whl'
按照提示把本地下載下傳好的那個檔案放到對應位置即可
最後,twisted安裝成功。
三、安裝Scrapy
pip install scrapy
檢查是否安裝成功,直接輸入scrapy,出現下面那堆就是你已經安裝好了