Command "python setup.py egg_info" failed with error code 1 - whatever package I try to install.

已回答

I have a reasonably fresh (just a few days ago) install of IntelliJ Community edition + python 3.6.1 (x64).

Almost any package install results in a failure.

E.G.

pip install mercurial

Collecting mercurial
  Using cached mercurial-4.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\CaswellP\AppData\Local\Temp\pycharm-packaging\mercurial\setup.py", line 708, in <module>
        setupversion = version.split('+', 1)[0]
    TypeError: a bytes-like object is required, not 'str'
    
    ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\CaswellP\AppData\Local\Temp\pycharm-packaging\mercurial\

I seem to recall coming across this awhile ago at another location and some python guru fixed it for me, I don't remember how but I think it's something to do with python 2/3 issues.

All python packages are up-to-date.

Running the same command as administrator has the same problem.

System: Windows 10 64bit.

Not sure if this should be in the PyCharm topic - sorry.

1

Could you please clarify, do you have the same error trying to install the package for your python SDK in the command line?

0
Avatar
Permanently deleted user

Not sure if this is the same issue or different, but trying to install package os, I get this:

 

Collecting os
Using cached os-0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/9d/n4p7scy52ls7lfxc7pbnhq6r0000gn/T/pycharm-packaging/os/setup.py'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9d/n4p7scy52ls7lfxc7pbnhq6r0000gn/T/pycharm-packaging/os/

0

Hi Bmcgeoch! os is a package in standard library, all you need is to import it with

import os
0
Avatar
Permanently deleted user

Same problem I downloaded Pycharm 3.8 community edition and when I tried to install Pygame package I got the following error

Collecting pygame
Downloading https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz (3.2MB)
Complete output from command python setup.py egg_info:


WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...


Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x86"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\gsugi\AppData\Local\Temp\pycharm-packaging\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\gsugi\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\gsugi\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\gsugi\AppData\Local\Temp\pycharm-packaging\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\gsugi\AppData\Local\Temp\pycharm-packaging\pygame\

 

help please

0

请先登录再写评论。