[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pysolar-discuss] Installation possible issue: Downloads Pysolar to wrong directory?


I installed pysolar via "sudo pip install pysolar" and I have python3.4.2
on my 64-bit Ubuntu machine.

Following along to the documentation, when I'm in python and I try:
 *>>>from pysolar.solar import **
 ImportError: No module named 'pysolar.solar'

Pysolar automatically downloaded to
/usr/local/lib/python2.7/dist-packages/pysolar

......................................................................................................

To reiterate:
When I ran python3 myprogram.py I get:

*    from pysolar.solar import *ImportError: No module named
'pysolar.solar'*

When I run python myprogram.py I get:







*Traceback (most recent call last):  File "tracker.py", line 22, in
<module>    get_altitude(42.206, -71.382, d)  File
"/home/ryankapur/.local/lib/python2.7/site-packages/pysolar/solar.py", line
58, in get_altitude    jd = time.get_julian_solar_day(when)  File
"/home/ryankapur/.local/lib/python2.7/site-packages/pysolar/time.py", line
742, in get_julian_solar_day    +AttributeError: 'datetime.datetime' object
has no attribute 'timestamp'*

.......................................................................................................

Why did Pysolar automatically download to the 2.7 directory? I moved it to
the 3.4/dist_packages manually with nautilus but* it didn't work*. It only
worked when I repeated this process after cloning the git repository.

I hope this long message can provide some useful feedback because it was
frustrating for me to figure out these import module errors--want to make
sure others don't encounter this in the future. Cheers to Pysolar!


Regards,
Ryan