4

I want to learn python3.x and am trying to get it installed on my windows 8.1 PC. I installed MinGW and saw a few files named python when it installed, but they don't appear to be executable. Tried python -v while in the directory of the files and no joy. Also they are in share directories, not bin directories.

Is python already installed in MinGW and if so, how do I set it up? Is this a good version to learn with - all the most used modules? If the answer to either of the first two is no, please point me to the best way to get a version with the most used modules installed for windows.

juanpa.arrivillaga
  • 88,713
  • 10
  • 131
  • 172
GuitarGirl
  • 51
  • 1
  • 1
  • 4
  • I mean, the version that is in MinGW...if indeed there is one. Yes, I agree that it's best to learn with the latest, but if I were off by a minor version or two I'm thinking it's probably not a big deal – GuitarGirl Apr 09 '17 at 02:19
  • I've moved on....installed anaconda and it appears to be working. – GuitarGirl Apr 10 '17 at 00:22

3 Answers3

1

If you have Msys2 (MinGW-w64), then you can get Python (currently it's 3.8) using pacman:

user@computer MSYS ~
$ pacman -Sy msys/python
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
  • 1
    You may face an invalid signature error, if so this can help resolve it : https://github.com/msys2/MSYS2-packages/issues/2058#issuecomment-673926156 – hack-tramp Feb 18 '21 at 13:15
  • @hack-tramp Thanks, I didn't face this problem, but others might. Having said that, any "rolling release" distro becomes more and more difficult to update as it ages, so at some point you're expected to just give up and start from scratch. – Dmitry Grigoryev Feb 18 '21 at 13:36
1

install msys2 and would recommend w64-x86_64 on msys2 (real mingw way!):

pacman -Rdd perl
    
pacman -S mingw-w64-x86_64-{gcc,perl,make,python}

pacman -S mingw-w64-x86_64-python-pip

pacman -S mingw-w64-x86_64-cython

pacman -S mingw-w64-x86_64-python-numpy

pacman -S mingw-w64-x86_64-python-pandas

pacman -S mingw-w64-x86_64-python-matplotlib

pacman -S winpty


C:\msys64\msys2_shell.cmd -mingw64

$ echo "alias python='winpty python.exe'" >> ~/.bashrc
sailfish009
  • 2,561
  • 1
  • 24
  • 31
0

MinGW does not come with Python. (At least the official MinGW.org distribution does not; there are other distributions which might.)

That said, MinGW is primarily a compiler toolchain for C and C++ (and optionally some other languages like Ada or Fortran, but Python isn't one of them). MinGW and Python don't have much to do with each other, so I don't see why MinGW would ship with Python.

If you'd like to use Python on Windows, the recommended way is to use the official installer from python.org.

HighCommander4
  • 50,428
  • 24
  • 122
  • 194
  • 2
    MinGW comes with a whole bunch of tools which are not part of the compiler but help building actual projects: `make`, `grep`, `perl`, etc. etc. so shipping with Python doesn't actually sound that crazy. – Dmitry Grigoryev Jan 17 '21 at 08:28