NelisW / pyradi

a Python toolkit to perform optical and infrared computational radiometry
http://nelisw.github.io/pyradi-docs/_build/html/index.html
MIT License
58 stars 34 forks source link

Issue with Installation #13

Closed GoogleCodeExporter closed 6 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I used SVN to download PyRadi and install to my Canopy Site-Packages 
Directory.
2. When I import Pyradi to use I get error message:

import pyradi as pyradi
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-27-1901b7ea3e08> in <module>()
----> 1 import pyradi as pyradi

C:\Users\fitzgetm\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pyradi
\__init__.py in <module>()
     37 
     38 import rychroma
---> 39 import ryplanck
     40 import ryfiles
     41 import ryplot

C:\Users\fitzgetm\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pyradi
\ryplanck.py in <module>()
     49 import numpy
     50 import scipy.constants as const
---> 51 import pyradi.ryutils as ryutils
     52 
     53 

AttributeError: 'module' object has no attribute 'ryutils'

What is the expected output? What do you see instead?
I expect to properly load module. INstead I get the above error message

What version of the product are you using? On what operating system?
PyRadi 115, Python 2.7.3, Numpy 1.7.1, Scipy 0.12, Mayavi $.3, Windows 8

Please provide any additional information below.

Original issue reported on code.google.com by tomfitzr...@gmail.com on 27 Aug 2013 at 1:29

GoogleCodeExporter commented 9 years ago
Hi Tom

Your versions of your packages are fine, I have the same. Only on Windows 7. 
And I installed them manually, not via the Canopy distro [but that should not 
make a difference].

We normally checkout (using subversion) into the python installation directory, 
C:\Python27\Lib\site-packages\pyradi on most PCs - in other words not into the 
user site packages directory, which you seemed to do.

The trouble seems to be with the pyradi.* qualifier when importing at the top 
of the file.  I moved pyradi imports not required at the top of a file to the 
"if __name__ == '__main__'" section, which should now allow correctly importing 
in the Canopy environment.

Please test and confirm!

Original comment by neliswil...@gmail.com on 28 Aug 2013 at 6:00

GoogleCodeExporter commented 9 years ago
Thanks for the fast feedback I will check asap. I did get it working but 
differently to your solution. I manually uninstalled Scipy 0.12 and installed 
Scipy 0.11 as specified. Pyradi worked right away with no changes. I suspect 
that what is specified by the error message is allowed by 0.11 and now 
forbidden in 0.12. 

Original comment by tomfitzr...@gmail.com on 28 Aug 2013 at 1:06

sfcook526 commented 5 years ago

Have had no luck downloading and installing Pyradi from Pypi using pip as instructed. Capture

NelisW commented 5 years ago

Hi there

I removed pyradi from PyPI, to became quite a burden to maintain and there are very few installs from there.

Please use the GitHub repo, which is the only and definitive version of pyradi. https://github.com/NelisW/pyradi If you clone or download you can use the code from the cloned/downloaded folder if you put a pyradi.pth file in your site-packages folder. The filename must be the name of the package (pyradi) with the pth extension (for path). With this file in site-packages, Python will know where to load it from.

here is where it is in Anaconda on my PC: [image: image.png]

The contents of this file must be the absolute path to where the pyradi setup.py or readme file is located on your disk. In my case the file has only one line: V:\work\WorkN\pyradi\pyradi

[image: image.png]

If you clone from GitHub, you can always get the latest version by updating your clone of the repo. I don't change so often any more, things are quite stable, even though we use it daily at a number of different sites.

Also see the example notebooks here: https://github.com/NelisW/ComputationalRadiometry

thanks for your interest!

good luck

Nelis

ps. you can reach me at neliswillers@gmail.com

On Mon, 1 Jul 2019 at 16:50, sfcook526 notifications@github.com wrote:

Have had no luck downloading and installing Pyradi from Pypi using pip as instructed. [image: Capture] https://user-images.githubusercontent.com/13067219/60445745-ab404a00-9bd4-11e9-849c-f77c0e060a0c.JPG

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/NelisW/pyradi/issues/13?email_source=notifications&email_token=ABOR6SOCLF6RD3ER2DYPD4LP5IKSFA5CNFSM4EHUDX62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6L4BA#issuecomment-507297284, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOR6SN4CV3XZUP4CSZOSI3P5IKSFANCNFSM4EHUDX6Q .