Post by riffelrw on Jan 30, 2021 8:29:41 GMT -8
Purchased the Skyweather2 from Kickstarter and working to start up my station. Another great SDL product for me.
Hardware is setup and i can receive JSON data from it. Software configuration is the issue. I am walking through installation of other packages by running both:
sudo python3 SkyWeatherConfiguration.py
sudo python3 SkyWeather2.py
Doing this, i discovered i needed to Remi and apscheduler and did it by researching on the internet. They appeared to install ok and the remi test routine finds their panel. Rebooted system after each install.
But when I run the skyweather2 configuration program, or the skyweather2 program itself, it says it can't find modules (remi in SkyWeatherConfiguration.py, apscheduler for SkyWeather2.py). Yet when I go into interpreted mode and type the same commands as in the respective py file, it finds them:
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ sudo python3 SkyWeatherConfigure.py
Traceback (most recent call last):
File "SkyWeatherConfigure.py", line 5, in <module>
import remi.gui as gui
ModuleNotFoundError: No module named 'remi'
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import remi.gui
>>> import remi.gui as gui
>>> import os
>>> import time
>>> import random
>>> import threading
>>> import remi.gui as gui
>>> import urllib.request
>>> from urllib.request import urlopen
>>> from remi.gui import *
>>> from remi import start, App
>>> import json
>>> class AppURLopener(urllib.request.FancyURLopener):
... version = "Mozilla/5.0"
...
>>> myURLOpener = AppURLopener()
__main__:1: DeprecationWarning: AppURLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
>>>
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ sudo python3 SkyWeather2.py
SkyWeather2.JSON File does not exist
Traceback (most recent call last):
File "SkyWeather2.py", line 21, in <module>
from apscheduler.schedulers.background import BackgroundScheduler
ModuleNotFoundError: No module named 'apscheduler'
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> # imports
... # Check for user imports
... from __future__ import print_function
>>>
>>> import config
SkyWeather2.JSON File does not exist
>>>
>>> config.SWVERSION = "020"
>>> # system imports
...
>>> import time
>>> from apscheduler.schedulers.background import BackgroundScheduler
>>> import apscheduler.events
>>>
>>> import subprocess
Is there something I'm missing perhaps relative to an external path configuration? Dont understand why interpreted works but runing native doesn't. I've done sudo and regular - no difference.
Thanks
Hardware is setup and i can receive JSON data from it. Software configuration is the issue. I am walking through installation of other packages by running both:
sudo python3 SkyWeatherConfiguration.py
sudo python3 SkyWeather2.py
Doing this, i discovered i needed to Remi and apscheduler and did it by researching on the internet. They appeared to install ok and the remi test routine finds their panel. Rebooted system after each install.
But when I run the skyweather2 configuration program, or the skyweather2 program itself, it says it can't find modules (remi in SkyWeatherConfiguration.py, apscheduler for SkyWeather2.py). Yet when I go into interpreted mode and type the same commands as in the respective py file, it finds them:
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ sudo python3 SkyWeatherConfigure.py
Traceback (most recent call last):
File "SkyWeatherConfigure.py", line 5, in <module>
import remi.gui as gui
ModuleNotFoundError: No module named 'remi'
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import remi.gui
>>> import remi.gui as gui
>>> import os
>>> import time
>>> import random
>>> import threading
>>> import remi.gui as gui
>>> import urllib.request
>>> from urllib.request import urlopen
>>> from remi.gui import *
>>> from remi import start, App
>>> import json
>>> class AppURLopener(urllib.request.FancyURLopener):
... version = "Mozilla/5.0"
...
>>> myURLOpener = AppURLopener()
__main__:1: DeprecationWarning: AppURLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
>>>
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ sudo python3 SkyWeather2.py
SkyWeather2.JSON File does not exist
Traceback (most recent call last):
File "SkyWeather2.py", line 21, in <module>
from apscheduler.schedulers.background import BackgroundScheduler
ModuleNotFoundError: No module named 'apscheduler'
pi@SkyWeather2:~/SDL_Pi_SkyWeather2 $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> # imports
... # Check for user imports
... from __future__ import print_function
>>>
>>> import config
SkyWeather2.JSON File does not exist
>>>
>>> config.SWVERSION = "020"
>>> # system imports
...
>>> import time
>>> from apscheduler.schedulers.background import BackgroundScheduler
>>> import apscheduler.events
>>>
>>> import subprocess
Is there something I'm missing perhaps relative to an external path configuration? Dont understand why interpreted works but runing native doesn't. I've done sudo and regular - no difference.
Thanks