preprocess icon indicating copy to clipboard operation
preprocess copied to clipboard

preprocess does not work out of the box on windows

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

I am unable to run "preprocess -h" in the dos-prompt on my windows 7 system and 
pythonxy v2.7.9 out of the box after installation.

I found that it has to do with the console script is not properly registered.


By changing the following in setup.py:

Replace 
    from distutils.core import setup
with
    from setuptools import setup

and
    scripts=[script],
with
    entry_points={
              'console_scripts': ['preprocess = preprocess:main']},

and redefining the beginning of the main function in preprocess to:

def main(argv=None):
    if argv is None:
        argv = sys.argv

it worked out of the box for me.



Original issue reported on code.google.com by [email protected] on 19 Jan 2015 at 2:01

GoogleCodeExporter avatar Jun 29 '15 07:06 GoogleCodeExporter

I'm having a similar problem. After conda install preprocess and running preprocess -h I get this error message:

python: can't open file 'C:\Users\johannr\Anaconda\Scripts\preprocess.py': [Errno 2] No such file or directory

The changes given above fixes the problem.

johannesring avatar Sep 11 '15 15:09 johannesring