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?

5
  • 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? Commented Nov 13, 2017 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.. Commented Nov 13, 2017 at 16:23
  • Can it be realted to the fact, that the PATH C:\Program Files (x86)\Python27 contains spaces? Commented Nov 13, 2017 at 17:15
  • Did you use Python or python? Does python work on cmd.exe? Commented Nov 13, 2017 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.... Commented Nov 13, 2017 at 21:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.