I have Windows 10 and Python 2.7 installed. When I run IDLE I find this:
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[MSC v.1500 32 bit (Intel)]
I want the default compiler here to be MinGW's GCC (I already installed MinGW) becaue I cannot import Theano with the MSC compiler
I tried all the tutorials out there and every time I successfully install Theano but when I try to import it I get the error "Problem occurred during compilation with the command line below:" and I get a huge list of errors. Btw, I don't have VS installed on my system
Edit Distutils config file C:\Python2.7\Lib\distutils\distutils.cfg (Create the file if it already does not exist).
Add the following to the file:
[build]
compiler = mingw32
This should work.
Related
I earlier had python installed from python.org ( MSC). Recently I installed MSYS2 and by default, python has installed again (GCC). If I check my python version in command prompt I will get this :
"Python 3.10.9 (main, Jan 14 2023, 21:23:14) [GCC 12.2.0 64 bit (AMD64)] on win32".
How to switch back to MSC ?
Edit :- After adding path in Environment variable ,I managed to solve it
I have installed python 2 and 3 and also have added the path to system variables. Everything except pip3 is working fine. Pip3 shows a error stating file is not found. Given below is the result I get on command line
Any direct pip3 command shows "The system cannot find the file specified". But if executed with "python3 -m" at the beginning then it runs fine. How can this be fixed so that pip3 can be accessed directly.
C:\Users>python3 -m pip --version
pip 20.1.1 from D:\Software\Python38\lib\site-packages\pip (python 3.8)
Python 2
C:\Users>python2
Python 2.7.18 <v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05> (MSC v.1500 64 bit <AMD64>] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> quit<>
C:\Users>pip2 —-version
pip 20.2.3 from d:\software\python27\lib\site-packages\pip (python 2.7)
Python 3
C:\Users>python3
Python 3.8.5 <tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit <Intel>] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> quit<>
C:\Users>pip3 —-version
Fatal error in launcher: Unable to create process using "d:\software\python38\python.exe" "D:\Software\Python38\Scripts\pip3.exe" —-version’: The system cannot find the file specified.
I am trying to install pygame. But I am not sure which version is appropriate for me.
I am working on a Windows 10 AMD64 PC.
The version of Python that is installed, shows-
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
on typing python into the command prompt.
I can find the packages here and here.
But there are only items listed such as-
Download repository
pygame-1.9.2-cp27-cp27m-win32.whl
pygame-1.9.2-cp34-cp34m-win32.whl
pygame-1.9.2-cp35-cp35m-win32.whl
pygame-1.9.2-cp27-cp27m-win_amd64.whl
pygame-1.9.2-cp34-cp34m-win_amd64.whl
pygame-1.9.2-cp35-cp35m-win_amd64.whl
Now I have no idea which one of these is to get.
And, what are the differences among cp27, cp34 and cp35?
Please help me choose my version.
normally you should just type following command
py -m pip install pygame
On non windows system you just type
pip install pygame
and the correct file will be downloaded and installed.
The pip module will consult https://pypi.org to indentify the versions available and choses normally the right one
The title says it all. I do see similar questions, someone suggested about http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame, but all the pygame downloadable files are in .whl format which I have no idea how to run on Windows 7. I tried "cd [directory] > pip install [filename]" without success.
This worked from me (Windows 7, python 2.7, 64 bit):
pip install C:/Users/ujjwal.karn/Downloads/pygame-1.9.2a0-cp27-none-win_amd64.whl
I downloaded the file pygame-1.9.2a0-cp27-none-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame as well.
In general, whl files are installed with pip:
pip install whatever.whl
Open the .whl file through WinRar and just extract the contents(you will find 3 folders) into your Python folder.
For example : if you had installed python 2.7.3 in C:, then your directory to extract will be C:\Python27
You are doing right. Please just check python command it should display win64
C:>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In
tel)] on win64 Type "help", "copyright", "credits" or "license" for more information.
if output is win32 install pygame‑1.9.2a0‑cp34‑none‑win32.whl
I'm trying to install a Python module on my Windows computer. I installed the development version of the NetBeans IDE to use as my Python editor, and it seems that they install Jython 2.5 under their own program folder, and force you to use that installation for development.
I've been trying to install the PyWhois module for half an hour now, and I'm getting pretty infuriated with the kludginess of developing Python on Windows with Netbeans.
Does anyone know how to install modules with this setup? Should I destroy my dev environment and use something else that would be less rage-inducing?
Jython is Python for Java - are you sure this is what you want? I have answered this for "normal" Python for Windows, I assume this is what you are after.
To use Python under Windows, you need to install the Windows binary installer, which you can download from the Python download page. Make sure you choose the binary installer.
Next, you will need to install setuptools, which you can get from the python package index (pypi).
Once you have installed both, you have Python available under Windows. You should be able to open a command prompt and type "python" to get the python prompt, it should look like this:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then, to install PyWhois, open a command prompt and type:
C:\>easy_install pywhois
You'll see output like this:
Searching for pywhois
Reading http://pypi.python.org/simple/pywhois/
Best match: pywhois 0.1
Downloading http://pypi.python.org/packages/source/p/pywhois/pywhois-0.1.tar.gz#
md5=b888dcd990574b7b284d9a9f4b300776
Processing pywhois-0.1.tar.gz
Running pywhois-0.1\setup.py -q bdist_egg --dist-dir c:\docume~1\40843\locals~1\
temp\easy_install-hugnul\pywhois-0.1\egg-dist-tmp-aarhii
Adding pywhois 0.1 to easy-install.pth file
Installing pywhois-script.py script to C:\Python27\Scripts
Installing pywhois.exe script to C:\Python27\Scripts
Installing pywhois.exe.manifest script to C:\Python27\Scripts
Installed c:\python27\lib\site-packages\pywhois-0.1-py2.7.egg
Processing dependencies for pywhois
Finished processing dependencies for pywhois
To confirm it is installed, you should be able to import it from Python:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywhois
>>>
Netbeans 7.0 has removed Python support (see http://wiki.netbeans.org/Python70Roadmap) for more information.
This http://wiki.python.org/moin/IntegratedDevelopmentEnvironments wiki entry lists some other IDEs you can try.