Hi All, I wanted to share my experience in the hopes it will help others who come up against similar issues.
I like to write in story form, so apologies for the length, but the Coles Notes version is: If you are installing on High Sierra and have python installed through macports then ensure that when you run the 'easy_install' commands that you are actually running the macports version, and not the version installed by default by Apple. There will be confusion on where packages are installed and they will not work. This goes for extensions using pip as well. Here is the full story: To Install Weewx on High Sierra 10.13.1 with current macports python 2.7: I have been running wview for my Vantage Pro 2 station since 2005. I have run it off of various hardware platforms, but, as I am doing other things with webcam capture and other customizations, and given my familiarity with macOS, I have been running wview on my Apple Mini for almost 7 years without issue. Due to the wview config and other things, I have the latest macports running with various packages most importantly Python, which has thrown up some roadblocks to get this working. I am sure there was a more elegant way to go about solving this, if anyone has suggestions, please do feel free to critique. I followed the docs/macos.htm file so first: *mini$ python -V* *Python 2.7.14* Great. Then did the list of “sudo easy_install” commands and didn’t notice anything wrong until I looked back through the messages. Noticed this for PIL: *mini$ sudo easy_install PIL* *Searching for PIL* *Reading https://pypi.python.org/simple/PIL/ <https://pypi.python.org/simple/PIL/>* *No local packages or download links found for PIL* *error: Could not find suitable distribution for Requirement.parse('PIL') * Uhoh… problem… did some Googling and found this: *mini$ sudo easy_install --find-links http://www.pythonware.com/products/pil/ <http://www.pythonware.com/products/pil/> Imaging* from here: https://webmail.cougar.eu.com/useful-guides/weewx-guides/weewx-installation-on-osx-2.html It installed! Excellent. Everything is good! Next the perl command. All good! Finally I hit “python setup.py install” and… *mini$ python setup.py install* *Traceback (most recent call last):* * File "setup.py", line 19, in <module>* * import configobj* *ImportError: No module named configobj* Huh? I run the easy_install again (from within that directory)… but it gives me this big long message about having the wrong PATH variable… I check my PATH, ok, added that in. Go back to my home directory and run easy_install again… yup, configobj is fine. Go to “/Library/Python” yup, directory is there. What gives!? So… after some thrashing around on the Google I realize there is a lot of talk about ‘versions’… and home directories and different ‘active’ installations, etc... eventually I come across a suggestion to run “which Python” (ya run that!) *mini$ which Python* */opt/local/bin/Python* And it dawns on me… MacPorts sets up its own structure in /opt/local and that’s the active one for scripts, but not from the command line! So… for some unknown reason that I don’t understand, if you run the "easy_install" from your home directory on the command line, it will by default use the built in MacOS Python in /Library so all the extensions are there. But building and installing expects the MacPorts version and the extensions to be under that different path! So… a little more thrashing around discovers where macports is hiding the current Python *mini$ **cd /opt/local/bin* *mini$ **ls* ….. *lrwxr-xr-x 1 root admin 80 27 Sep 08:29 easy_install-2.7 -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/easy_install-2.7* *…..* Ahah! So… the moral of this story is if you have installed Python in MacPorts, you’re going to need to make sure you use the MacPorts version of Python. So redo the “Install the requirements list” substituting * sudo easy_install* …. with : *mini$ sudo easy_install-2.7* …. Once those were installed, I redownloaded the weewx tar file just in case, did the perl script, ran the python install and VOILA! WeeWX is installed. Hope this is handy for others on macOS 10.13 High Sierra or other installs with macports. Please do provide critiques, improvements, or general laughing at i-should-know-better-after-15-years-of-this-stuff… all good. :) Cheers, A Happy Weewx user. Chris www.alberniweather.ca P.S. I can also report that weewx seemed to ingest my historic wview sdb archive just fine, as advertised! And it actually fixed the NOAA reports which have been wonky for a couple versions for some parts of my records. I am generally a very happy camper. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
