This question already has answers here:
Cannot install pygame in Pycharm
(1 answer)
pycharm doesn't recognize pygame package
(2 answers)
Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'dir:\projectPath\venv\Scripts\python.exe'
(8 answers)
Closed 2 years ago.
I am trying for a while now to install pygame into my Project but whatever I try is doesn’t work. The real frustrating part is that I managed to do it in the past. Witch might be the problem, but I am getting ahead of myself.
Environment:
Python 3.8
Windows 10
I use PyCharm
pip install pygame
i get:
Collecting pygame
Using cached
https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441
db2be/pygame-1.9.6.tar.gz
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-x64"? [Y/n]Traceback (most
recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\setup.py", line 194, in
<module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\buildconfig\config.py", line
210, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-la9vy5w2\pygame\buildconfig\config_win.py",
line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-
la9vy5w2\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\User\AppData\Local\Temp\pip-
install-la9vy5w2\pygame\
I fould someone else who had the sme problem here:
Pip Install EOFError
and also:
Unable to install pygame on Python 3.8 via pip (Windows 10)
So I tried:
pip install pygame==2.0.0.dev6
I got:
Collecting pygame==2.0.0.dev6
Using cached
https://files.pythonhosted.org/packages/c5/a0/63f9ca836e6a08e560f1ef3f2535ffb46bfdad2abb093dd097dae25
2be28/pygame-2.0.0.dev6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\setup.py", line 258, in
<module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\config.py", line
208, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\buildconfig\download_win_prebuilt.py", line 17, in download_sha1_unzip
import requests
ModuleNotFoundError: No module named 'requests'
Making dir :prebuilt_downloads:
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-uf_w85qw\pygame\
I also tried some other stuff, like updating pip, but in the end I ended up with the same error message again. (If us want to see the full log just say it and I will upload the other 2 pages of error message.)
Am I right in my assumption that pip tries to install the game from a local file and that file is somehow corrupted or something?
If so how can I make pip install the packed form the Internet?
If not what is the problem?
I can even life with some weird solution like coping a entire project including its packages. (ok that would bug me a little, but as long as it works ...)
Since it was suggested to me I tried
pip install requests
in a new project:
Collecting requests
Using cached
https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests)
Using cached
https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached
https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests)
Using cached
https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
Using cached
https://files.pythonhosted.org/packages/9f/f0/a391d1463ebb1b233795cabfc0ef38d3db4442339de68f847026199e69d7/urllib3-1.25.10-py2.py3-none-any.whl
Installing collected packages: chardet, certifi, idna, urllib3, requests
Successfully installed certifi-2020.6.20 chardet-3.0.4 idna-2.10 requests-2.24.0 urllib3-1.25.10
and than:
pip install pygame==2.0.0.dev6
leading to:
Collecting pygame==2.0.0.dev6
Using cached https://files.pythonhosted.org/packages/c5/a0/63f9ca836e6a08e560f1ef3f2535ffb46bfdad2abb093dd097dae252be28/pygame-2.0.0.dev6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\setup.py", line 258, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\config.py", line 208, in main
deps = CFG.main(**kwds)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\config_win.py", line 559, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 269, in ask
update(x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 252, in update
download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 101, in download_prebuilts
download_sha1_unzip(url, checksum, temp_dir, 1)
File "C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\buildconfig\download_win_prebuilt.py", line 37, in download_sha1_unzip
raise ValueError(
ValueError: url:https://bitbucket.org/llindstrom/pygame/downloads/prebuilt-x64-pygame-1.9.2-20150922.zip should have checksum:3a5af3427b3aa13a0aaf5c4cb08daaed341613ed: Has:9571d3c5ad8347afb0b101bc242ef5da1a46bb11:
Making dir :prebuilt_downloads:
Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip 0bbac0106358dc99b8ba2401ae6a1c10d3927ca9
Unzipping :prebuilt_downloads\SDL2-devel-2.0.10-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b
Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.14-VC.zip c64d90c1f7d1bb3f3dcfcc255074611f017cdcc4
Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.14-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc
Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip:
Downloading... https://www.ijg.org/files/jpegsr9c.zip 9ca086c960ffc4bff821ba194c8d0a15f69eae09
Unzipping :prebuilt_downloads\jpegsr9c.zip:
Downloading... https://bitbucket.org/llindstrom/pygame/downloads/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed
---
For help with compilation see:
https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\User\AppData\Local\Temp\pip-install-ccq77zry\pygame\
here:
https://github.com/googleapis/google-cloud-python/issues/3884
I found the advice to use:
pip install --upgrade setuptools
witch lead to:
Collecting setuptools
Downloading
https://files.pythonhosted.org/packages/6d/ed/52e05469314a266f68d9f251a8c1ab7a21a03327b1724056e3eea654bfd1/setuptools-50.0.3-py3-none-any.whl (784kB)
100% |████████████████████████████████| 788kB 1.2MB/s
Installing collected packages: setuptools
Found existing installation: setuptools 40.8.0
Uninstalling setuptools-40.8.0:
Could not install packages due to an EnvironmentError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'd:\\workspace\\pycharmprojects\\libs5\\testproject\\venv\\lib\\site-packages\\setuptools-40.8.0-py3.8
.egg'
Consider using the `--user` option or check the permissions.
so i tried:
pip install --upgrade setuptools --user
witch worked:
Collecting setuptools
Using cached
https://files.pythonhosted.org/packages/6d/ed/52e05469314a266f68d9f251a8c1ab7a21a03327b1724056e3eea654bfd1/setuptools-50.0.3-py3-none-any.whl
Installing collected packages: setuptools
Successfully installed setuptools-50.0.3
sadly this did not change the Error message.
I am trying to install this Python Package:
https://pypi.org/project/SalesforcePy/#install
I am running on python 3.7 on macOS Mojave, I've never experienced an issue downloading a package from github before.
When I tried pip install git+ssh://git#github.com/forcedotcom/SalesforcePy.git
I get this:
Collecting git+ssh://git#github.com/forcedotcom/SalesforcePy.git
Cloning ssh://git#github.com/forcedotcom/SalesforcePy.git to /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b
Running command git clone -q ssh://git#github.com/forcedotcom/SalesforcePy.git /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ERROR: Command "git clone -q ssh://git#github.com/forcedotcom/SalesforcePy.git /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-ly43g63b" failed with error code 128 in None
I also tried downloading it on my desktop and got this:
pip install Desktop/SalesforcePy-1.1.1
Processing ./Desktop/SalesforcePy-1.1.1
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/setup.py", line 7, in <module>
with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/requirements.txt'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/xb/_9gc6p552hz8m7vjc5wbgjbm0000gp/T/pip-req-build-n3xo0za2/
The second error message is tracked by forcedotcom/SalesforcePy issue 41 and is still pending.
The first one should work though (it is a public repository), and is the recommended method. The syntax is correct (using '/' everywhere).
It might be a consequence of the second error message: an error from requirement.txt, which might needs a preprocessing, as in this project.
I am trying to import 'multiprocessing' and using python 3.5.3 but its gives error
Traceback (most recent call last):
File "ssser.py", line 7, in <module>
import mutiprocessing
ImportError: No module named 'mutiprocessing'
when i try to install multiprocessing module then i again error occure
i am using following command for installation
python3 -m pip install multiprocessing
and got error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-26ilgzih/multiprocessing/setup.py", line 94
print 'Macros:'
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-26ilgzih/multiprocessing/
however when i import "import multiprocessing" in terminal then no error occure but when i used in my file "ssscr.py" then it gives error
i am using geany,and python3 (IDEL) on raspberry pi3
Can any body help me how i can fix this error ?
For others who faces Similar error like
ModuleNotFoundError: No module named 'multiprocessing';
would also occur if you name your python file as multiprocessing.(as it makes ambiguity between your program name and actual module name)
Just rename your file and it will work (if you have dependency installed).
Seems like you are installing multiprocessing in the python 2 version. Could you use pip3 to install the package?
pip3 install multiprocessing
Also use the following command to check which pip you are using
$ ls -l `which pip`
$ ls -l `which pip3`
And to see if the package got correctly installed or not use
$ pip show pip
$ pip3 show pip
Update:
multiprocessing is built-in after python2.6
OP did a typo. It should be
import multiprocessing in place of import mutiprocessing
My problem is:
I am having trouble for installing RDF package. I am using python 3.6.3.
C:\Users\suresh\Downloads>pip --no-cache-dir install RDF
Collecting RDF
Downloading rdf-0.9a6.tar.gz (48kB)
100% |████████████████████████████████| 51kB 749kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\setup.py",
line 1, in <module>
from ez_setup import use_setuptools
File "C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\ez_setup.py",
line 97
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\suresh\AppData\Local\Temp\pip-build-62ewx87w\RDF\
Any suggestions to solve this problem, so that I can install the RDF package? Please suggest me any solution if you have ever encounter this problem before.
Setup script of RDF package is erroneous. It is specified to work with Python3 but uses the try...catch syntax of Python2. You can either use the package with Python2 or follow up with the developer of RDF package to fix the install issue for Python3. The package is broken for Python3 at the moment.
My current verios of linux is 3.19.3 - Arch . I looked up for some answers trying to figure out the problem but I could not get any specific answer for the error I get.
This is the Error
Collecting pyinstaller Using cached PyInstaller-2.1.tar.gz Complete
output from command python setup.py egg_info: Traceback (most recent
call last): File "", line 20, in File
"/tmp/pip-build-wzwxrat3/pyinstaller/setup.py", line 18, in
from PyInstaller import get_version File
"/tmp/pip-build-wzwxrat3/pyinstaller/PyInstaller/init.py", line
32, in from PyInstaller import compat Command "python
setup.py egg_info" failed with error code 1 in
/tmp/pip-build-wzwxrat3/pyinstaller