I managed to install pip but when I use pip to install the downloaded wheel, it prints:
C:\Python34\Scripts\pip install pygame-1.9.2a0-cp34-none-win_amd64.whl
Requirement 'pygame-1.9.2a0-cp34-none-win_amd64.whl' looks like a filename, but the file does not exist
pygame-1.9.2a0-cp34-none-win_amd64.whl is not a supported wheel on this platform
The file is in the same folder (Scripts) with pip.
I did try to use the wheel tool too:
C:\Python34\Scripts\wheel install pygame-1.9.2a0-cp34-none-win_amd64.whl
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 358, in main
args.func(args)
File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 301, in install_f
args.wheel_dirs, args.force, args.list_files)
File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 202, in install
raise WheelError("No such wheel file: {}".format(req))
wheel.tool.WheelError: No such wheel file: pygame-1.9.2a0-cp34-none-win_amd64.whl
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\Scripts\wheel.exe\__main__.py", line 9, in <module>
File "C:\Python34\lib\site-packages\wheel\tool\__init__.py", line 361, in main
sys.stderr.write(e.message + "\n")
AttributeError: 'WheelError' object has no attribute 'message'
I use PowerShell, please help!
Use pip to install wheel files using the full path:
C:\Python34\Scripts\pip install C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl
Without the path the name is seen as a requirement rather than a already-downloaded file. This should work for wheel files that support your current Python architecture. You can verify your architecture with:
C:\Python34\python.exe -c "import distutils.util; print(distutils.util.get_platform())"
This should print win_amd6. If it prints win32 instead, you have a 32-bit Python binary and need to pick a different wheel.
pip install pygame-1.9.2a0-cp27-none-win_amd64.whl
this worked on my computer with Python2.7.3(64bit) while other versions not worked.
Install wheel support for pip:
pip install wheel
Install the downloaded wheel:
pip install path/to/pygame-1.9.2a0-cp34-none-win_amd64.whl
I had to remove the 64bit python and install the 32bit version to solve this issue.
c:\python34\scripts\pip install c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Unpacking c:\users\USER\downloads\pygame-1.9.2a0-cp34-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame
Cleaning up...
Worked fine with 32bit :)
Related
I'm trying to install the pygmentize module on a Windows XP computer which uses Python 3.3.6 (Sep 29th, 2012)
When I did pip install pygmentize it returned windows XP Fatal error in launcher: Unable to create process so I've applied this solution and here it is how went:
$ python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/8a/d7/f505e91e2cdea53cfcf51f4ac478a8cd64fb0629cedde20d9a6a9b/pip-21.2.2-py3-none-any.whl (1.6MB)
100% |################################| 1.6MB 87kB/s
Installing collected packages: pip
Found existing installation: pip 7.1.2
Uninstalling pip-7.1.2:
Successfully uninstalled pip-7.1.2
Successfully installed pip-21.2.2
When I've tried to install again:
$ pip install pygmentize
Traceback (most recent call last):
File "c:\programs\python-3.3\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\programs\python-3.3\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File "C:\Programs\python-3.3\Scripts\pip.exe\__main__.py", line 5, in <module>
File "c:\programs\python-3.3\lib\site-packages\pip\__init__.py", line 1, in <module>
from typing import List, Optional
ImportError: No module named 'typing'
Assuming that pip-21.2.2 is fully compatible with pyrhon-3.3.6 I think it's caused by my python-3.3.6 being incompatible with the current version of pygmentize If that is the case how can I check which version of pygmentize is compatible with python-3.3.6 and how can I install that compatible version of it in python-3.3.6 ?
If you use pycharm you can go to "python-packages" and search for pygmentize then install it
problem: I can't run "tensorboard --logdir=summaries" in my terminal because I get this error
system: macbook pro running Catalina
environment: running pyenv with python3 as global
package: I have tensorflow 2.2.0 installed via pip
I have setuptools 49.1.0
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 10, in
sys.exit(run_main())
File "/Library/Python/3.7/site-packages/tensorboard/main.py", line 65, in run_main
default.get_plugins() + default.get_dynamic_plugins(),
File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 125, in get_dynamic_plugins
"tensorboard_plugins"
File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 124, in
for entry_point in pkg_resources.iter_entry_points(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 2410, in load
self.require(*args, **kwargs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 2433, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (setuptools 40.8.0 (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages), Requirement.parse('setuptools>=41.0.0'))
the setuptools version you have is 40.8.0.
tensorboard needs setuptools>=41.0.0.
So there are two solutions:
update setuptools to >=41.0.0
create a new environment with setuptools>=41.0.0.
MacOs may not allow you to update setuptools, due to system integrity protection
Adding --user python to the command allowed this to work.
In other words
pip install --upgrade setuptools --user python
As it turns out I was not using Pyenv correctly. Once I used "pyenv global system" then I was able to update the pip packages correctly and the right setuptools was installed and TensorBoard ran as expected
I used pip to install a script, named stdlib_list:
Microsoft Windows [Version 10.0.18362.418]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\Sam>python -m pip install stdlib_list --user
Requirement already satisfied: stdlib_list in c:\users\sam\appdata\roaming\python\python37\site-packages (0.5.0)
Note that stdlib_list installed to a folder named python37
I have checked the path that Windows is using.
Note that the environment variable path points to Python38-32, which is not python37
What gives?
Edit:
Output of Windows where pip:
C:\Users\Sam>where pip
C:\Program Files\Python37\Scripts\pip.exe
C:\Users\Sam\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe
C:\Users\Sam>
and pip -V:
C:\Users\Sam>pip -V
Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\pip.exe\__main__.py", line 9, in <module>
TypeError: 'module' object is not callable
That's because you're using the pip version installed in Python38-32, not python37.
To change it, ensure that your command python in a terminal points to the correct python installation, and it'll install for the correct version.
All credit for this answer goes to byxor, who left their answer as a comment, instead of an answer:
On the Windows command line, type:
C:\Users\Sam\AppData\Local\Programs\Python\Python38-32\python.exe -m pip install stdlib_list
I want to install pygame 1.9.6 on msys2 using pip for python2.7. The problem is that i'm getting an error when i try to install it with 'pip install pygame'.
This is the error:
Processing d:/msys64/home/desolaser/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/desola~1/appdata/local/temp/pip-req-build-tn9xwt/setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "buildconfig/config.py", line 210, in main
deps = CFG.main(**kwds)
File "buildconfig/config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "buildconfig/download_win_prebuilt.py", line 303, in ask
'\nDownload prebuilts to "%s" and copy to %s? [Y/n]' % (download_dir, dest_str))
EOFError: EOF when reading a line
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:/users/desola~1/appdata/local/temp/pip-req-build-tn9xwt/
I tried doing the same in python3 with 'pip3 install pygame' but i get the same error.
It is possible to install pygame on msys2?
I had this error as well. You can install it from a wheel file.
First install wheel into python using pip.
pip install wheel
Go to this page
https://pypi.org/project/pygame/#files
or
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
They have built wheel files for pygame for 32 and 64 bit, depending on which type of python you have installed. So for 32-bit python version 3.7, on windows, you would download
pygame-1.9.6-cp37-cp37-win32.whl
Then install the wheel file
pip install C:/some-dir/pygame-1.9.6-cp37-cp37-win32.whl
So, I'm currently trying to install this package:
pip install git+https://github.com/Rapptz/discord.py#async
Github here: https://github.com/Rapptz/discord.py
but I get this error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-khtOce/aiohttp/setup.py", line 61, in <module>
raise RuntimeError("aiohttp requires Python 3.4.1+")
RuntimeError: aiohttp requires Python 3.4.1+
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-khtOce/aiohttp/
So instead I have tried using pip3 to install the same package, but I'm currently getting a version conflict which I do not know how to solve.
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==8.1.1', 'console_scripts', 'pip3')()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14- py2.7.egg/pkg_resources.py", line 305, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2243, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip3') not found
I remember doing this yesterday, and I may have toyed around installing and reinstalling pip, but before, when I tried to install the same package when pip3 was working, I still remember getting the same error, so idk if solving the version conflict will do much.
I think you have a setuptools conflict here which will probably be resolved by updating setuptools.
Try:
pip install setuptools --upgrade
You can remove the previous setuptools installation in case it gives you a problem.