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

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


I'm running pysolar under 2.4, but I use this wording:

import Pysolar

My guess is that "Pysolar" is case sensitive.  Hope this helps,

Jay

On Thu, Jun 4, 2015 at 3:26 PM, Ryan Kapur <ryankapur@xxxxxxxxxxxx> wrote:

> 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
>