解決Mac安裝scrapy失敗的問題
今天打算弄個(gè)爬蟲,想來想去打算用python弄一個(gè)。之前了解到scrapy這個(gè)庫是個(gè)不錯(cuò)的選擇,于是開始折騰。可惜第一步就掛了。
安裝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。
結(jié)論是:
brew install python
原因是舊的python版本在新的mac系統(tǒng)上有些問題。升級(jí)一下就好了。
以上這篇解決Mac安裝scrapy失敗的問題就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
Python實(shí)現(xiàn)學(xué)生管理系統(tǒng)并生成exe可執(zhí)行文件詳解流程
由于Python都會(huì)了,學(xué)校教的確實(shí)基礎(chǔ),平時(shí)就沒怎么去上課,讓美女老師天天腦殼痛,這不快畢業(yè)了,讓我做一個(gè)學(xué)生管理系統(tǒng)出來,還要打包成exe發(fā)給她,她就不追究我不上課的問題了2022-01-01
Gradio機(jī)器學(xué)習(xí)模型快速部署工具quickstart前篇
這篇文章主要為大家介紹了Gradio機(jī)器學(xué)習(xí)模型快速部署工具quickstart準(zhǔn)備原文翻譯,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-04-04
python使用socket連接遠(yuǎn)程服務(wù)器的方法
這篇文章主要介紹了python使用socket連接遠(yuǎn)程服務(wù)器的方法,涉及Python中socket通信的基本技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-04-04
import?paddle報(bào)錯(cuò)的成功解決方法
最近安裝paddle的時(shí)候遇到了些問題,這里給大家總結(jié)下,下面這篇文章主要給大家介紹了關(guān)于import?paddle報(bào)錯(cuò)的成功解決方法,需要的朋友可以參考下2023-06-06
Python將視頻或者動(dòng)態(tài)圖gif逐幀保存為圖片的方法
本文是基于opencv將視頻和動(dòng)態(tài)圖gif保存為圖像幀的方法,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2019-09-09
python字符串切割:str.split()與re.split()的對比分析
今天小編就為大家分享一篇python字符串切割:str.split()與re.split()的對比分析,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-07-07

