pipinstallwechatpy报错

多两口 多两口     2022-09-25     390

关键词:

安装python 版WeChat sdk

pip install wechatpy[cryptography]

报错

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-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/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/k2/x01hrj4552l0746g8fxdk5400000gn/T/pip-0E52Fq-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

在用pip install安装python的一些包的时候遇到这个错误是因为这些包需要依赖six,在安装six的时候发现系统已经有一个six-1.4.1但又没有权限卸载它,所以无法安装新版本。six-1.4.1是系统内置的packages,因 系统集成保护 你是没有权限去修改/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info目录的。

解决方法是安装这些包时选择忽略six的安装:

sudo pip install wechatpy[cryptography] --upgrade --ignore-installed six

之后发现还是报错

Installing collected packages: six, python-dateutil, xmltodict, enum34, optionaldict, idna, urllib3, certifi, chardet, requests, pycparser, cffi, asn1crypto, ipaddress, cryptography, wechatpy
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/six.py'

权限问题,尝试

sudo pip install wechatpy[cryptography] --upgrade --ignore-installed six

参考文档:

http://wechatpy.readthedocs.io/zh_CN/master/install.html

http://www.cnblogs.com/chxw2017/p/6837100.html

http://blog.csdn.net/alanzjl/article/details/46849307

 

-------------------------------- 2017-11-08 更新 ---------------------------------------.

python安装第三方库超时

例如:

pip install python-weixin 报错如下
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

解决:

pip --default-timeout=100 -U python-weixin

另外遇到 OSError: [Errno 13] Permission denied:这种权限问题可以尝试sudo

 

报错记录(xml抬头报错)

报错记录(xml抬头报错)Referencedfilecontainserrors(http://www.springframework.org/schema/beans/spring-beans-3.1.xsd).Formoreinformation,rightclickonthemessageintheProblemsViewandselect"ShowDetails..."将Preferences>XML>XMLFiles>Validation中"HonourallXMLschemalocations"前的对... 查看详情

ruby镜像报错,compass安装报错

在这几天在电脑上安装compass一直报错,很无语。因为安装的ruby和sass都没有问题,虽然是很久之前安装的。 sass#更新sassgemupdatesass #检查sassversionsass-v gem#检查gemgem-v #更新系统gemgemupdate--system//在这里报错 compass#... 查看详情

升级macxcode打包证书报错git报错

resettryAgaingit在钥匙串中找不到指定的项 重新配置公钥撕咬SSHkeysAnSSHkeyallowsyoutoestablishasecureconnectionbetweenyourcomputerandGitLab.BeforegeneratinganSSHkeyinyourshell,checkifyoursystemalreadyhasonebyrunningth 查看详情

oralce报错注入(转自某个奇安信大佬)(代码片段)

0x00 前言在oracle注入时候出现了数据库报错信息,可以优先选择报错注入,使用报错的方式将查询数据的结果带出到错误页面中。使用报错注入需要使用类似1=[报错语句],1>[报错语句],使用比较运算符,这样的方式进行报... 查看详情

001--idea第一个报错jni报错

java.lang.SecurityException:Prohibitedpackagename:java atjava.lang.ClassLoader.preDefineClass(ClassLoader.java:662) atjava.lang.ClassLoader.defineClass(ClassLoader.java:761) atjava.security.SecureClas 查看详情

js报错

记录一些平时遇到的报错:1.UncaughtReferenceError:Invalidleft-handsideinassignment  xhr.readState==4写成了xhr.readState=4,少写了一个符号。  查看详情

drushccall报错

请看好指明了Module文件的行数报错一定要多看看哦。 查看详情

mysql基于“报错”的注入

报错是如何转为xss的?mysql语句在页面报错,泄露信息=========================================================================================================================================================================* 查看详情

vue项目空格报错,缩进不对报错,格式报错!!!

vue-cli构建项目之后发现写几句代码就会报错,但是语法什么的都没有问题,只是因为缩进、空格之类的,对于初学者格式不规范的人来说是相当难受的图中框住的位置都会报错!! 现在有两种办法:1、是因为你设置了eslint... 查看详情

yarn报错记录

参考技术Ayarn报错超时,设置镜像yrmtest查看源耗时yrmusetaobao使用淘宝源yarnconfiglist查看镜像已经是淘宝的镜像还是报错,把yarn.lock,删掉,重新yarn使用yarnconfigsetignore-enginestrue重新yarn,又有报错 查看详情

kafka报错日志压缩报错直接退出

Resetting firstdirtyofsettologstart offset2971862sincethecheckpointedoffset12675089isinvalid reruirementfailed11302544messagesinsegment __consumer_offsets-31/000000000000169538124.log butoffsetmapcanonly5033164,youcanincrease  查看详情

我的日常报错学习记录

项目创建完成后配置数据库,发现报错,去pom.xml里配置了druid驱动以及mysql连接配置,依旧报错,但是同类型的其他项目并没有报错,于是先继续写下去,结果到了mapper层,无法导出@mapper的包,mybatis.xml也报错,开始排查错误,... 查看详情

myeclipsejs报错

Myeclipse 版本10.1加载的js报错,解决方法:window -> preferences->myeclipse->validation,在右边下拉框找到 JavaScriptvalidationforjsfiles 将其勾选取消,然后apply, 然后保存 。这样项目中js就不会报错了。(此方法... 查看详情

jstl前台报错

报错信息:jsp页面报错Cannotfindthetaglibrarydescriptorfor"http://java.sun.com/jsp/jstl/core" 解决方案:/WebContent/WEB-INF/lib目录下导入jstl.jar和standard.jar包,导入之后jsp页面可能还会报如上错误信息,直接发布部署项目,项目部署成功后,就... 查看详情

maven报错maven项目update之后报错oneormoreconstraintshavenotbeensatisfied.

在右键项目UpdateProject之后报错:Oneormoreconstraintshavenotbeensatisfied.Spring4.1requiresJava1.6ornewer. 解决问题:ThesolutionisIhavetogototothe".settings"folderwhichisattheprojectlocationanddeleted"org.eclip 查看详情

反复循环避免报错(代码片段)

try:报错的代码行except报错类别break  查看详情

puppet报错

新服务器装完系统后,安装puppet后执行如下操作报错:执行puppetagent-t的时候报错;Aug3009:14:28masterdbpuppet-agent[66746]:Unabletofetchmynodedefinition,buttheagentrunwillcontinue:Aug3009:14:28masterdbpuppet-agent[66746]:getaddrinfo: 查看详情

vs2022异常报错,报错内容见描述,求解法?

...安装完之后,前一段时间好好的,后一段时间就开始频繁报错,中间也没干过什么太大的事,之后重装软件,主体文件安在了C盘,缓存还是在E盘没动,报错更频繁,有应用报错和系统报错,应用报错有:1.devenvexe已停止工作2.找不到... 查看详情