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
Related
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
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 :)
I am trying to install PyQt4 on mu ubuntu 14.o4 LTS.
The installation manual says that before installing PyQt, sip must be installed having version atleast 4.16 .
So, I downloaded the archive and installed it as given here
python configure.py
However, when I type sip -V to know the version of sip, I get 4.15. Also if at this stage I try to install PyQt, the installation aborts saying that sip version atleast 4.16 is required
So, I tried to uninstall previously installed sip by pip uninstall sip.
This threw an error, I am pasting the contents of pip.log here.
------------------------------------------------------------
/usr/bin/pip run on Thu Oct 9 06:48:46 2014
Cannot uninstall requirement sip, not installed
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/uninstall.py", line 59, in run
requirement_set.uninstall(auto_confirm=options.yes)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1035, in uninstall
req.uninstall(auto_confirm=auto_confirm)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 505, in uninstall
raise UninstallationError("Cannot uninstall requirement %s, not installed" % (self.name,))
UninstallationError: Cannot uninstall requirement sip, not installed
It clearly says that sip is not installed on the system. I am confused about what is happening over here. Please help.
EDIT
Also please note that import sip from within python confirms that no module named sip is there.
I was learning Python from 'learning python the hard way' and I was stuck at exercise 46 (http://learnpythonthehardway.org/book/ex46.html).
I installed pip and then the nose package and whenever i run nosetest now as in the example it doesn't work. This is the error I get:
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2807, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: nose==1.3.0
I googled about this but couldn't find an answer.
I am on a Lubuntu 13.04 desktop.
You need to install a version of nose equal to 1.3.0 (maybe the nose version that you installed is not 1.3.0?)
You can find out what version of nose you have installed with
>>> import nose
>>> nose.__version__
'1.3.0'
Using pip this is as simple as (if you already have nose installed then you will want to use the --upgrade flag)
pip install --upgrade nose==1.3.0
or even direct from the website
pip install -Iv https://pypi.python.org/packages/source/n/nose/nose-1.3.0.tar.gz#md5=95d6d32b9d6b029c3c65674bd9e7eabe