0
所以我是Python新手,學習它的好方法是做一些個人項目:)所以我在我的Windows,並使用virtualenv
遏制環境pip在Python 3中安裝python模塊,但該模塊有一個依賴包,需要Python 2
所以,我需要使用雜湊模塊:
pip install scrappy
Collecting scrappy
Using cached Scrappy-0.3.0.alpha.4.tar.gz
Collecting guessit (from scrappy)
Using cached guessit-2.1.4.tar.gz
Collecting tvdb_api (from scrappy)
Using cached tvdb_api-2.0.tar.gz
Collecting hachoir-metadata (from scrappy)
Using cached hachoir-metadata-1.3.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\hachoir-metadata\setup.py", line 65
except OSError, err:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USERPH\AppData\Local\Temp\pip-build-__zp7zbj\h
achoir-metadata\
其因hachoir-metadata
是Python2依賴包,所以我嘗試安裝它們的p ython 3版
pip install hachoir3
我證實,它是使用
pip list | Select-String hachoir3
所以我試圖運行
pip install scrappy
再次
但同樣的錯誤安裝。
任何解決方法安裝scrappy?我不能去Python 2.
謝謝!
最終使用conda,並使用他們在conda-forge頻道中的Scrapy。謝謝! –