Skip to main content

Transform Generator in a Python 3 Evnironment

4 posts / 0 new
Last post
clkotnik
clkotnik's picture
Transform Generator in a Python 3 Evnironment

Being rather new to Python, I setup and have been using Anaconda3/Python 3.6 for my development.  I recently realized that Transform Generator, having been developed some time back, will not run in this environment.

Here is what I have done to get it working for me on my Windows PC.  I suspect more experienced Python developers may be able to suggest ways to streamline this.

First, I installed a python 2.7 "environment" from my Anaconda prompt with:

conda create -n py27 python=2.7 anaconda

This installed a large number of items and created new Anaconda Navigator (py27) and Anaconda Prompt (py27) items in the Anaconda3 program group.Then I placed a file, TG.bat, in the Anaconda3\envs\py27\Scripts directory that contains the single line:

pythonw E:\Users\clk\Anaconda3\Photometry\TG_V6.0.pyw

When E:\Users\clk\Anaconda3\ is my Anaconda directory. Then to launch Transform Generator I open the Anaconda Prompt (py27) and issue the command TG.

I hope this may save some folks a bit of time.  Please suggest optimizations if you find them.

best regards,

Cliff

mgw
mgw's picture
Thanks! - and upcoming TG release

Cliff,

Thanks very much for figuring this out.  I will add your instructions on the TG web page so Python 3.x users can use them..

FYI, I am releasing a new version V6.2 of TG next week.  It adds support for the standard field Melotte 111, and also includes updated instructions for Mac users based on the latest Mac OSX High Sierra release and most recent anaconda python 2.7 release.  Some Mac users have been having issues; these instructions should enable everyone on a Mac to use TG.

SFS
Up to Python 3

I am wondering if it would not be easier simply to fix the code to allow it to run on Python 3.  While I learned on 2.7, I notice that practically everything these days is written for Python 3, which is improved over 2.7 IMO.

mgw
mgw's picture
Next TG version will run under either python 2 or 3

Thanks to Matt Craig TG version 6.2 will run under either python version.  Will finalize and release  next week.

Log in to post comments
AAVSO 49 Bay State Rd. Cambridge, MA 02138 aavso@aavso.org 617-354-0484