解決Mac安裝scrapy失敗的問題
更新時間:2018年06月13日 09:39:46 作者:lihenair
今天小編就為大家分享一篇解決Mac安裝scrapy失敗的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
今天打算弄個爬蟲,想來想去打算用python弄一個。之前了解到scrapy這個庫是個不錯的選擇,于是開始折騰??上У谝徊骄蛼炝?。
安裝scrapy庫就不成功:
Installing collected packages: six, w3lib, parsel, pyasn1, pyasn1-modules, attrs, service-identity, scrapy Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling six-1.4.1: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move copy2(src, real_dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat os.chflags(dst, st.st_flags) OSError: [Errno 1] Operation not permitted: '/var/folders/r9/35q9g3d56_d9g0v59w9x2l9w0000gn/T/pip-oWMyqW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
果斷google+stackoverflow。
結論是:
brew install python
原因是舊的python版本在新的mac系統(tǒng)上有些問題。升級一下就好了。
以上這篇解決Mac安裝scrapy失敗的問題就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
Python SELENIUM上傳文件或圖片實現(xiàn)過程
這篇文章主要介紹了Python SELENIUM上傳文件或圖片實現(xiàn)過程,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下2019-10-10Python?Opencv中獲取卷積核的實現(xiàn)代碼
這篇文章主要介紹了Python?Opencv中獲取卷積核的實現(xiàn)代碼,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-07-07python數(shù)學建模(SciPy+?Numpy+Pandas)
這篇文章主要介紹了python數(shù)學建模(SciPy+?Numpy+Pandas),文章基于python的相關資料緊接上一篇文章內(nèi)容展開主題詳情,需要的小伙伴可以參考一下2022-07-07Python實現(xiàn)Mysql全量數(shù)據(jù)同步的腳本分享
這篇文章主要為大家詳細介紹了基于Python如何實現(xiàn)Mysql全量數(shù)據(jù)同步的功能,文中的示例代碼講解詳細,感興趣的小伙伴可以跟隨小編一起了解一下2023-06-06