If you have multiple, then check which version is being executed with which python in each case.
CYGWIN PYTHON 3 COMMAND INSTALL
For example did you install through both cygwin and anaconda? Do you only have one python installed on your system? Or might you have multiple. The next thing is related, but what python interpreter is being executed in each case. Pro-tip: you can write the output of the env command to a file with env > c:/users//env1.txt (then use env2.txt from your shell script) and then compare them with the command line tool diff. #!/bin/shĬompare the two environments and see if there are any differences. Then add the same command to the start of your shell script. When running from the cygwin terminal execute the command env to see what the environment is (it's been a while since I've used windows, but I suspect env is part of cygwin or built into bash). My first guess would be a difference in the environment when you use the cygwin terminal and when you execute bash through the batch file. I don't know exactly what the issue is but here are a couple of things: Environment Why do these two methods give different results? How might I get a Python script to run with a resolution of (1920, 1200) in an automated way? Thank you. Then my GUI Python script runs but is distorted (i.e., it's too large for the screen), and the resolution comes back as (1280, 800).
CYGWIN PYTHON 3 COMMAND WINDOWS
However, if I try to automate this process by double-clicking on the following Windows batch file: c:\cygwin\bin\bash c:/users//.sh
(If w, h = root.winfo_screenwidth(), root.winfo_screenheight() appears in the Python script, for example, then the outputted values, corresponding to the screen resolution, are (1920, 1200).) When I start Windows, open a Cygwin terminal, enter export DISPLAY=:0.0 and then enter python c:/users//.py, my GUI Python script runs normally.
CYGWIN PYTHON 3 COMMAND WINDOWS 8.1
I'm running Windows 8.1 / Cygwin 2.8.2 (and XWin Server at startup) / Python 2.7.13 (and am new to Cygwin and Python please let me know if I can provide more details). usr/include/python3.6m/Python.h:39:10: fatal error: crypt.h: No such file or directoryĮrror: command 'gcc' failed with exit status 1ĮRROR: Command "/usr/bin/Python3 -u -c 'import setuptools, tokenize _file_='"'"'/tmp/pip-install-2iedylp7/kiwisolver/setup.py'"'"' f=getattr(tokenize, '"'"'open'"'"', open)(_file_) code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"') f.close() exec(compile(code, _file_, '"'"'exec'"'"'))' install -record /tmp/pip-record-2u43qpmd/install-record.I'm getting a different screen resolution (in a Python script) depending on whether I type commands into Cygwin manually or run them using a shell script, and I can't understand why. In file included from py/kiwisolver.cpp:8:0: