嵌入式Python 3.5"python setup.py egg_info"失败,错误代码为1 [英] Embedded Python 3.5 "python setup.py egg_info" failed with error code 1

查看:102
本文介绍了嵌入式Python 3.5"python setup.py egg_info"失败,错误代码为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试"pip install" PyAutoGUI(以及其他模块),并且出现以下错误:

I am attempting to "pip install" PyAutoGUI ( among other modules ) and I am getting the following error :

Collecting pyautogui
  Using cached PyAutoGUI-0.9.35.zip
  Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\PyAutoGUI.egg-info
writing top-level names to pip-egg-info\PyAutoGUI.egg-info\top_level.txt
writing requirements to pip-egg-info\PyAutoGUI.egg-info\requires.txt
writing pip-egg-info\PyAutoGUI.egg-info\PKG-INFO
writing dependency_links to pip-egg-info\PyAutoGUI.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\PyAutoGUI.egg-info\SOURCES.txt'
error: [Errno 2] No such file or directory: 'C:\\Users\\myDir\\Downloads\\python-3.5.0-embed-win32\\python35.zip\\lib2to3\\Grammar.txt'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in         C:\Users\myDir\AppData\Local\Temp\pip-build-aqcbpbui\pyautogui\

这是在没有管理员权限的Windows 10 Professional上完成的(因此是使用Python 3.5的嵌入式方法).我能够pip安装openpyxl没问题,但是运行相同的命令(python -m pip install pyautogui)时,我得到了上面描述的错误消息和回溯信息.我已经完成了zip的干净提取,发现了同样的问题.

This is being done on a Windows 10 Professional without admin rights ( hence the embedded method of using Python 3.5 ). I was able to pip install openpyxl without issue but when running the same command ( python -m pip install pyautogui ) I get the described error message and traceback found above. I've done clean extractions of the zip and found the same problem.

我搜索了SO,仅发现与Mac环境和未列出操作系统的单个实例相关的问题(),但未产生任何肯定的结果(实际上最终得到了与错误代码1不同的错误消息)建议的第二步...但是...一次出现一个问题:P)

I searched through SO and only found questions that related to Mac environments and a single instance where the OS wasn't listed ( "python setup.py egg_info" failed with error code 1 ) which yielded no positive results ( actually ended up getting a different error message with the second suggested step...but...one issue at a time :P )

我已确认所讨论的文件(('C:\ Users \ myDir \ Downloads \ python-3.5.0-embed-win32 \ python35.zip \ lib2to3 \ Grammar.txt')已存在,甚至已解压缩只是为了确保目录(将zip完整保存在其中,以确保自己被覆盖).我尝试了Easy_install,它产生了一组类似的消息和最终结果错误(不发布以减少这篇文章的混乱情况,但会根据要求提供).

I've confirmed that the file in question (( 'C:\Users\myDir\Downloads\python-3.5.0-embed-win32\python35.zip\lib2to3\Grammar.txt' )) exists and even unzipped the directory just to be sure ( leaving the zip there as well intact to keep myself covered ). I attempted Easy_install and it yielded a similar set of messages and end result error ( not posting it to reduce clutter of this post but will provide on request ).

任何建议将不胜感激.谢谢你.

Any advice would be thoroughly appreciated. Thank you.

推荐答案

在使用适用于Windows的3.5.2和3.6.1版本的嵌入式python发行版zip时,我遇到了同样的问题. 但是,使用MSI安装程序不会出现此问题.

I faced the same problem while using 3.5.2 and 3.6.1 versions of the embedded python distribution zip for Windows. Though, with the MSI installer, this problem does not arise.

我怀疑,这与\ lib2to3 \ Grammar.txt的python3X.zip文件的读取方式有关. 这是我的解决方法:

I suspect, this has something to do with the way the python3X.zip file is read for \lib2to3\Grammar.txt. Here is how I have resolved it :

  1. 我已将python35.zip文件重命名为其他名称(.zipp等.)
  2. 我在原始提取的文件夹中创建了一个文件夹"python.zip"
  3. 确保在此文件夹中可以访问"\ lib2to3 \ Grammar.txt".
  4. 运行"python -m pip install"
  5. 像魅力一样工作!

可能是黑客,但是找不到解决方法.

A hack probably, but, could not find a way around.

这篇关于嵌入式Python 3.5"python setup.py egg_info"失败,错误代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆