I have a weather station and i need to write a program which can take the instrument readings and save them in a text file. I decided to try and use pywws to retrieve the data but i cannot import the module into python to use its commands. I am doing this on a raspberry pi model B and i am using python 3 and the latest version of pywws. When i try to use import pywws it says that it does not exist. I am using a USB wireless weather forecaster from maplin and so far i have been using this tutorial to set it up: http://www.weather.dragontail.co.uk/index.php?page=pywws_ini
Asked
Active
Viewed 248 times
0
-
1Can you post an [SSCCE](http://sscce.org/) detailing how you are trying to import the module? If there is an error being reported, what (exactly) does it say? Also, where is the script you are importing `pywws` into located, and, similarly, where is the `pywws` module itself located? – Chris Sprague Dec 12 '14 at 18:32
-
Are you sure it's installed? Did you use pip to install it? were there any errors doing that? generally I find on raspberry pi you have to 'sudo pip install' everything. – brobas Dec 12 '14 at 19:35
-
@brobas Yes i used sudo pip install to install pywws, it works perfectly fine, my problem comes when i want to import the scripts into python – SSB Dec 12 '14 at 21:51
-
Could be a pythonpath issue, If you issue this: export PYTHONPATH=$PYTHONPATH:/path/to/your/package and then in same shell start Python interpreter and try import does that work? Also See some answers here: http://stackoverflow.com/questions/25276329/cant-load-python-modules-installed-via-pip-from-site-packages-directory – brobas Dec 13 '14 at 07:41
2 Answers
0
I fixed this problem, turns out that pywws does not work with python 3, it only works with python 2. I booted up python 2 and typed "import pywws" and it worked fine.

SSB
- 11
- 2
0
pywws definitely does work with python 3, as long as you install it correctly. Python 2 to Python 3 translation is done by the setup.py script during installation.

Jim Easterbrook
- 154
- 4
-
Could you elaborate on what steps should be taken to ensure it is correctly installed? – EWit Jan 06 '15 at 19:47
-
The easiest way is to use pip: `pip install pywws`. This will install it for your default python version. If you have both python2 and python3 installed you may have pip2 and pip3 commands available. Note you will also need to install the dependencies for whichever Python version you are going to use. – Jim Easterbrook Jan 07 '15 at 20:05
-
PS The pywws documentation has more detail on installation: http://pythonhosted.org/pywws/en/html/guides/getstarted.html – Jim Easterbrook Jan 08 '15 at 11:04