Running python script in cygwin


 
Thread Tools Search this Thread
Top Forums Programming Running python script in cygwin
# 1  
Old 03-02-2015
Running python script in cygwin

I have python installed here on windows:
Code:
 C:\Python27

and can run a script from the command line but would rather use cygwin.

$ cd "C:\Users\cmccabe\Desktop\annovar"

cmccabe@DTV-L2231M5J /cygdrive/c/Users/cmccabe/Desktop/annovar
$ python run_batch_job.py
Traceback (most recent call last):
File "run_batch_job.py", line 16, in <module>
from suds.client import Client
ImportError: No module named suds.client

The suds client is installed here on windows:
Code:
 cd Python27\Scripts

Thank you Smilie.
# 2  
Old 03-02-2015
I think this is an environment problem. cygwin has no problem running simple non-windowing applications written for windows. Python and perl both import modules, so to make thing work, you may want to go into cygwin setup and dowload the version of python you want. You code will port, you will also need to get imports into the cygwin subs-system. I have this with both python & perl. And you can execute from the DOS cmd.exe command line as well -

Code:
# shell
C:\cygwin\bin\bash testit.sh
#
C:\cygwin\bin\python testit.py

# 3  
Old 03-02-2015
Is there a way to intall the suds.client in cygwin to run a web service?

Code:
 
from suds.client import Client
ImportError: No module named suds.client

Thank you Smilie.

---------- Post updated at 01:02 PM ---------- Previous update was at 12:38 PM ----------

I also tried:

Code:
 'C:\Python27\python.exe' run_batch_job.py Sanger.txt Test.txt PositionConverter
-bash: C:\Python27\python.exe: command not found

Thank you Smilie.
# 4  
Old 03-04-2015
1. You need to install the required python module. Search on the internet on how to do it, you'll get lot of tutorials on the same.

2. For your 2nd problem, you could try the cygwin style path: /cygdrive/c/Python27/python run_batch_job.py
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies

2. UNIX for Advanced & Expert Users

Running Powershell Script from Linux through Cygwin

Hello Experts, I am creating a run time powershell script on Linux machine and copying that powershell script to Windows machine. To connect to windows through "ssh", I am using Cygwin tool. To make the connection password less I copied my public in authorized_keys in windows Administrator... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies

3. UNIX for Dummies Questions & Answers

CRONTAB - one python script is not running

Hi! I'm using a RaspberryPi with standard Raspbian. Currently I'm working on some sort of weather station. For now I have three python scripts - one which is updating txt files for website - update1m.py ( it will not be necessary in few next days so I'll delete it) , second one for updating... (4 Replies)
Discussion started by: bartocham
4 Replies

4. Shell Programming and Scripting

Running q-shell commands( on IBM-i Series) from cygwin terminal (on windows)

I have cygwin installed on windows server and when I do echo $SHELL the output is /bin/bash I have created a ssh tunnel from this windows server through cygwin to ibm -i series which is running Q-shell. I am trying to invoke a utility wsadmin (used for scripting) on ibm-i from the... (12 Replies)
Discussion started by: gaurav99
12 Replies

5. AIX

Strange problem running python program from within ant

Hello, I'm currently trying to port an ant based build to AIX 6.1. The build queries the underlying version control system (Mercurial) for some data, which works fine on other platforms (Linux, Solaris). However, on AIX the hg command fails to load python's md5 module when used in the build,... (1 Reply)
Discussion started by: dhs
1 Replies

6. Shell Programming and Scripting

Running shell script in Cygwin terminal

I am new to shell scripting. I tried to run a simple shell script using Cygwin terminal in Win XP env. The script I have written is as follows - #!/bin/bash a=5 ] && echo "true" || echo "false" But when I execute the script, getting some confusing error. The error I am getting are - ... (3 Replies)
Discussion started by: linux_learner
3 Replies

7. Shell Programming and Scripting

opening new instance of cygwin from withing cygwin

I'm using cygwin on win7, What I would like to do is something like this: cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e I know I can start a new instance using either of these: mintty -e ... cygstart tail ... But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies

8. Programming

Compiling and running Python code

Hey there, First post here in the Unix forums, but I have used them a lot for research over the last year. Anyways, to why I'm here now: I'm working on a project and I'll be using the AIS Parser SDK by Brian C. Lane (can't post the link, but google that and the first 8 links will be relevant) ... (4 Replies)
Discussion started by: pmd006
4 Replies

9. Programming

Running programs from a Python script

Any idea how I can run a program from a phyton script? For example, in csh I will do $tpath/tsimplex base=$fbase data=$fdata restore=$frestore \ nxp=$nx nzp=$nz param=$param intp=$intp nlay=$nlay \ varp=$varp sigma0=$sigma maxiter=$maxiter tol=$tol \ ... (2 Replies)
Discussion started by: kristinu
2 Replies

10. UNIX for Dummies Questions & Answers

Running a.out on Cygwin

I wrote and compiled a program on a unix machine using g++. Now I copied it over to the machine with the Unix emulator Cygwin. I tried to run it by entering "a.out" in the command prompt but was given: "bash: a.out: command not found" (without the quotes) Also worth mentioning is that i... (5 Replies)
Discussion started by: hito
5 Replies
Login or Register to Ask a Question