解决Mac安装scrapy失败的问题
作者:lihenair 时间:2022-12-26 10:28:32
今天打算弄个爬虫,想来想去打算用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。
结论是:
http://stackoverflow.com/questions/31900008/oserror-errno-1-operation-not-permitted-when-installing-scrapy-in-osx-10-11
brew install python
原因是旧的python版本在新的mac系统上有些问题。升级一下就好了。
来源:https://blog.csdn.net/lihenair/article/details/54914518
标签:Mac,安装,scrapy
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
winxp 安装MYSQL 出现Error 1045 access denied 的解决方法
2024-01-20 20:53:09
python 使用get_argument获取url query参数
2023-02-12 03:52:18
按钮上的内容
2007-11-27 00:13:00
![](https://img.aspxhome.com/file/UploadPic/200711/27/2007112701734981s.jpg)
CSS3的五个使用技巧[译]
2009-02-19 13:01:00
![](https://img.aspxhome.com/file/UploadPic/20092/19/01-92s.jpg)
Python实现爬取亚马逊数据并打印出Excel文件操作示例
2021-09-10 05:10:36
![](https://img.aspxhome.com/file/2023/3/105203_0s.png)
MySQL索引之主键索引
2024-01-25 01:52:04
Django实现静态文件缓存到云服务的操作方法
2023-05-26 07:52:54
教你设计大型Oracle数据库
2024-01-28 06:51:36
Python数据类型之String字符串实例详解
2022-01-08 11:38:50
Vue编写多地区选择组件
2024-06-07 15:24:40
![](https://img.aspxhome.com/file/2023/7/123007_0s.gif)
详解Python flask的前后端交互
2023-03-19 06:41:05
![](https://img.aspxhome.com/file/2023/0/117420_0s.png)
asp如何让计数器只对新进用户计数?
2010-05-13 16:36:00
VB.NET调用MySQL存储过程并获得返回值的方法
2024-01-12 16:03:45
javascript格式化json显示实例分析
2024-05-22 10:31:14
Numpy中Meshgrid函数基本用法及2种应用场景
2023-05-11 20:13:21
![](https://img.aspxhome.com/file/2023/3/101203_0s.jpg)
pandas使用函数批量处理数据(map、apply、applymap)
2023-03-07 11:12:09
php+lottery.js实现九宫格抽奖功能
2024-04-17 10:34:28
![](https://img.aspxhome.com/file/2023/1/136231_0s.jpg)
Django-migrate报错问题解决方案
2021-11-05 13:30:16
Django crontab定时任务模块操作方法解析
2022-08-01 03:50:56
AJAX:如何处理书签和后退按钮
2008-03-21 18:44:00