have a prob with a not loaded or installed Python package

83 views
Skip to first unread message

Dirk

unread,
Jun 2, 2019, 8:01:55 AM6/2/19
to weewx-user
Hi,

have a prob with an extension, this needs the python packages, python-dateutil(dateutil) and requests

now i have install weewx on a Raspi3 and i will be crazy with this error:


the setup.py has the follow entrys and it works on Ubuntu very well:


gives a chance to add a python package to the weewx container, that solve the prob, or give an other way to install these packages in force mode?

in the build and install process comes no Errors or fails up.

I hope you can help me, cheers
Dirk :-)

gjr80

unread,
Jun 2, 2019, 11:33:03 PM6/2/19
to weewx-user
Hi,

It looks like you have modified the WeeWX installer and it has not done what you want. I cannot help with that but I suggest the easiest way to fix your requests import error is to manually install the python requests library. To install requests try (untested):

1. install pip:

$ sudo apt-get install python-dev
$ sudo apt
-get install python-pip

2. install the requests library:
$ sudo pip install requests

Note that if your modified installer did not work as expected it is possible you will have other unmet dependencies (ie errors). You will need to deal with them as they occur and you may well have to install other libraries.

Gary

John Kline

unread,
Jun 2, 2019, 11:37:27 PM6/2/19
to weewx...@googlegroups.com
I’m not so sure he modified anything.  The packages need to be installed manually when using setup.py for installation.

In particular, look at the Install Prerequisites section.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0a9b6a73-fdba-4ab5-acf2-ad30d2456d0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gjr80

unread,
Jun 2, 2019, 11:48:02 PM6/2/19
to weewx-user
I am not sure what was done either. However, the setup.py that was included in the post is a modified version of the WeeWX setup.py, I can only surmise it was modified and used. Agree 100% that for setup.py you need to manually install any additional packages, the recommended way to do that is to manually install them from the command line and not by modifying setup.py

Gary

On Monday, 3 June 2019 13:37:27 UTC+10, John Kline wrote:
I’m not so sure he modified anything.  The packages need to be installed manually when using setup.py for installation.

In particular, look at the Install Prerequisites section.

On Jun 2, 2019, at 8:33 PM, gjr80 <gjrod...@gmail.com> wrote:

Hi,

It looks like you have modified the WeeWX installer and it has not done what you want. I cannot help with that but I suggest the easiest way to fix your requests import error is to manually install the python requests library. To install requests try (untested):

1. install pip:

$ sudo apt-get install python-dev
$ sudo apt
-get install python-pip

2. install the requests library:
$ sudo pip install requests

Note that if your modified installer did not work as expected it is possible you will have other unmet dependencies (ie errors). You will need to deal with them as they occur and you may well have to install other libraries.

Gary

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

John Kline

unread,
Jun 3, 2019, 1:05:32 AM6/3/19
to weewx...@googlegroups.com
Sorry about that.  I see now that he has added two packages to the requires section; apparently rather than installing them.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e2601499-8147-4f9a-8a06-d7664ebbea95%40googlegroups.com.

Dirk

unread,
Jun 3, 2019, 8:14:15 AM6/3/19
to weewx-user
@Gary, all the stuff iss installed on my Raspi, 
$ sudo pip install requests
$ sudo pip install python-dateutil

and all what here is writen:
http://weewx.com/docs/setup.htm

the prob is that weeutil, cannot import these librarys and in these way i have found a way to install it with setup.py, but it dosent work.
I have in the moment no idea why these not work and we i can add the 2 additional librarys in the weewx-container that my extension will work.

gjr80

unread,
Jun 3, 2019, 8:26:56 AM6/3/19
to weewx-user
OK, so what happens if you launch a python shell and try to import requests, eg:

$ python
>>>import requests

Is requests found?

Gary

Dirk

unread,
Jun 3, 2019, 9:43:25 AM6/3/19
to weewx-user
yes worked

gjr80

unread,
Jun 3, 2019, 10:10:45 AM6/3/19
to weewx-user
OK, so requests is installed and python can find it. Let's try running WeeWX directly rather than as a daemon. Try:

$ sudo /home/weewx/bin/weewxd /home/weewx/weewx.conf

Does that display any error on the console or in the log? Your log output should be in /var/log/syslog unless you have changed it. If there are any errors (console or log) post them back here.

Also, is it possible to capture the console output as text and post it rather than posting screen capture images, screen capture images are rather difficult to read at times on a mobile device.

Gary

Dirk

unread,
Jun 4, 2019, 1:19:57 PM6/4/19
to weewx-user
Hey Guys,

i cannot say what it was, but after reboot, delete /home/weewx and the build folder in my source and rebuild and install it with $ sudo python setup.py ...

this fucking thing runs without any failure, why? no idea...

i think they has kidding me :-D

thanks for your help, Cheers
Dirk :-)
Reply all
Reply to author
Forward
0 new messages