0

I want to execute a software that was written for linux initially and uses python and c code . Therefore i installed MinGW including mysys.

Under Linux you start a run.sh script that starts the program:

#! /bin/bash
python some_script.py -i somefile.abc -q

however when i open the MinGw shell and execute the script i get the follwing promt:

$ Python
sh: Python: command not found

Python is installed under C:\Program Files (x86)\Python27 in windows 7.

Inside the "fstab" file under "C:\MinGW\msys\1.0\etc" i added the following lines:

# Win32_Path                Mount_Point
#-------------------------------------  -----------
C:/MinGW                /mingw
C:\Program Files (x86)\Python27         /python

MinGw and mysys are in windows path.

I found the following threads while searching but they do not seem related at all: Link1 Link2

Do i understand my problem correctly, that i have to tell MinGW where the windows python installation is located?

NorrinRadd
  • 545
  • 6
  • 21
  • Has the C been compiled on Windows? Is that what you are trying to do? Is the C calling python or is python calling C? – cdarke Nov 13 '17 at 15:31
  • python is calling C in the program i want to use. But even without this being the case MinGW should see my python installation shouldn't it? Even if i type `Python` directly to the shell it doesn´t find it.. – NorrinRadd Nov 13 '17 at 16:23
  • Can it be realted to the fact, that the PATH `C:\Program Files (x86)\Python27` contains spaces? – NorrinRadd Nov 13 '17 at 17:15
  • Did you use `Python` or `python`? Does `python` work on `cmd.exe`? – cdarke Nov 13 '17 at 20:53
  • python works in cmd .. it also works if i use `C:/Program\ Files\ \(x86\)/Python27/python` in MinGW. Guess its smart to install stuff were the default installer tells you. Linux ports dont work good with spaces it seems. Unfotunately i reinstall is not an option at the moment.... – NorrinRadd Nov 13 '17 at 21:03

0 Answers0