2

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\

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.

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 )

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.

Community
  • 1
  • 1
Dapper
  • 93
  • 1
  • 8
  • Does trying to install other modules cause a similar error on your machine? (For example, try `pip install pymsgbox`) – Al Sweigart Mar 28 '17 at 23:54

4 Answers4

15

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.

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. I have renamed the python35.zip file to something else (.zipp etc ..)
  2. I have created a folder "python.zip" inside my original extracted folder
  3. Made sure that "\lib2to3\Grammar.txt" is accessible within this folder.
  4. Ran "python -m pip install "
  5. Worked like a charm !

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

Diptiman
  • 166
  • 1
  • 5
0

It seems, as you said, that you havent admin privileges.

Try to run for the current user, thus without admin privileges: pip install --user pyautogui

Guillaume Lebreton
  • 2,586
  • 16
  • 25
  • It yielded the same error. I am getting the feeling I will just have to wait for the admin team to take a look at it locally. – Dapper Mar 22 '17 at 21:31
0

For me just unzipping the python36.zip to a folder python36.zip did the trick.

user1767754
  • 23,311
  • 18
  • 141
  • 164
0

I had the same error, but it was related to the clearing of all *.pyc and pycache files in the dir: python-3.5.4-embed-amd64/. As I restored them all worked fine. But your method to extract python35.zip file to python35.zip folder worked as fine well.

K0ertis
  • 121
  • 1
  • 9