[AstroPy] Back to Python. Precession and PhysConst code.

Wayne Watson sierra_mtnview@sbcglobal....
Wed Jan 25 20:03:39 CST 2012


Hi, Erik. I tried the "Setup.py install", but I didn't have the folder 
installed under .../site-packages. It couldn't find setup.py. I'll 
adjust that per your comment. I was able to extract the tar.gz file onto 
my Win7 with IZarc.

Thanks for the P.S.  I'm in and out of the Python world as it is useful, 
which boils down to maybe a few days every month.  Matters could pick up 
though.

Two years ago or so I was looking for a way to distribute a py program 
in an (exe)cutable form, but whatever process I tried was much too trouble.

On 1/25/2012 4:31 PM, Erik Bray wrote:
> Hi Wayne,
>
>       Your best bet is to install packages into a standard location that
> Python is aware of.  On Windows that would be
> C:\PythonX.Y\site-packages.  As Russel wrote, one way to do that is to
> download the tar.gz file containing the source code, extract it, and
> then run setup.py install.
>
>       Another way--for example if you don't have a program in Windows
> that can open tar/gz files--is to install easy_install+distribute.
> Simply download http://python-distribute.org/distribute_setup.py and run
> `python distribute_setup.py`.  Then run: `easy_install RO`.  That should
> ensure that the RO package is installed in the proper place where Python
> can find it.
>
>
> Erik
>
> P.S.
>
>       Don't worry about distutils--distutils is the standard product
> packaging system that comes with Python.  If you see a Python package
> that comes with a file named 'setup.py', then executing `python setup.py
> install` will install the package for you in such a way that it can
> always be found by Python.  The existence of a setup.py file means that
> the package is installable with distutils or some derivative thereof.
>
>       distribute, which I suggested you install, is one such derivative.
>    It includes the program called easy_install which makes it relatively
> painless (in most cases) to install new Python packages hosted on the
> Python Packaging Index (http://pypi.python.org).
>
>       For a full explanation of the Python packaging ecosystem, see my
> presentation at http://stsdas.stsci.edu/download/packaging-overview.pdf
>    I'll be happy to answer any further questions.
>
> On 01/25/2012 05:02 PM, Wayne Watson wrote:
>> OK, how do I untar it Win7? Ah, good fortune. I have MinGW (gfortran)
>> that has a linux-like shell, and has tar.
>>
>> Is there a description of the module's contents?
>>
>> On 1/25/2012 1:41 PM, Russell Owen wrote:
>>> No, it's a cross-platform unix/mac/windows package. It uses Python's older standard installation system (one that precedes easy_install).
>>>
>>> In windows I believe you go to the command line, cd to the package directory and type "setup.py install". On any other system you type "python setup.py install".
>>>
>>> -- Russell
>>>
>>> On Jan 25, 2012, at 12:59 PM, Wayne Watson wrote:
>>>
>>>> So it's a Linux application?  No msi or zip?  Never used distutils.  Sounds hairy.
>>>>
>>>> I have the fortran version, so maybe I'll try that.  What I liked about the py program is that it had a test inside it.
>>>>
>>>> On 1/25/2012 12:22 PM, Russell Owen wrote:
>>>>> Yes to all that. It is pure python. Install it using distutils as usual.
>>>>>
>>>>> -- Russell
>>>>>
>>>>> On Jan 25, 2012, at 11:45 AM, Wayne Watson wrote:
>>>>>
>>>>>> Thanks, but it looks like your PyPI is in a tar file. I'm using Win7.  RO 2.9.3 is a download.  I see some refs to Win, but I'm not sure what to make of them.
>>>>>>
>>>>>> On 1/25/2012 9:34 AM, Russell Owen wrote:
>>>>>>> You have an incomplete package. Download RO from PyPI. The stuff you are looking for is in RO.Astro. euler is included in the package.
>>>>>>>
>>>>>>> -- Russell
>>>>>>>
>>>>>>> On Jan 24, 2012, at 8:29 PM, Wayne Watson wrote:
>>>>>>>
>>>>>>>> It's been quite awhile since I used python, but I was digging around on
>>>>>>>> PC for something on precession, and discovered some code for it,
>>>>>>>> prec.py.   Here are the first few lines.
>>>>>>>>
>>>>>>>> #!/usr/bin/env python
>>>>>>>> """
>>>>>>>> History:
>>>>>>>> P.T.Wallace   Starlink   10 July 1994
>>>>>>>> 2002-07-08 ROwen    Converted to Python.
>>>>>>>> 2007-04-24 ROwen    Converted from Numeric to numpy (in test code).
>>>>>>>> """
>>>>>>>> import RO.PhysConst
>>>>>>>> from euler import *
>>>>>>>> ...
>>>>>>>> ...
>>>>>>>>
>>>>>>>> It dies on RO.PhysConst when I run it.  Probably a further difficulty is
>>>>>>>> the euler reference.
>>>>>>>> I have the code for RO.PhysConst.py
>>>>>>>>
>>>>>>>> What needs to be done to successfully execute prec.py?
>>>>>>>>
>>>>>>>> --
>>>>>>>>               Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>>>>>>>>
>>>>>>>>                 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>>>>>>>>                  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>>>>>>>>
>>>>>>>>                         In 2904 there will be 5 solar eclipses.
>>>>>>>>                         On July 16, 2185 the longest solar
>>>>>>>>                         eclipse inf 5k years will occur, 7 min.
>>>>>>>>
>>>>>>>>                        Web Page:<www.speckledwithstars.net/>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> AstroPy mailing list
>>>>>>>> AstroPy@scipy.org
>>>>>>>> http://mail.scipy.org/mailman/listinfo/astropy
>>>>>> --
>>>>>>              Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>>>>>>
>>>>>>                (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>>>>>>                 Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>>>>>>
>>>>>>                        In 2904 there will be 5 solar eclipses.
>>>>>>                        On July 16, 2185 the longest solar
>>>>>>                        eclipse inf 5k years will occur, 7 min.
>>>>>>
>>>>>>                       Web Page:<www.speckledwithstars.net/>
>>>>>>
>>>>>>
>>>> --
>>>>              Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>>>>
>>>>                (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>>>>                 Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
>>>>
>>>>                        In 2904 there will be 5 solar eclipses.
>>>>                        On July 16, 2185 the longest solar
>>>>                        eclipse inf 5k years will occur, 7 min.
>>>>
>>>>                       Web Page:<www.speckledwithstars.net/>
>>>>
>>>>
> _______________________________________________
> AstroPy mailing list
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>

-- 
            Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

              (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
               Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                      In 2904 there will be 5 solar eclipses.
                      On July 16, 2185 the longest solar
                      eclipse inf 5k years will occur, 7 min.

                     Web Page:<www.speckledwithstars.net/>




More information about the AstroPy mailing list