Turns out, it's not so easy to find weectl either. The actual executable is generated by pip, so I can't add something to it to record its location.
I've settled for pressing on, but printing a diagnostic: The configuration file will be created at */Users/tkeffer/weewx-data/weewx.conf*. Processing configuration file /Users/tkeffer/weewx-data/weewx.conf. Making directory /Users/tkeffer/weewx-data/skins. Copying new skin Smartphone into /Users/tkeffer/weewx-data/skins/Smartphone. Copying new skin Rsync into /Users/tkeffer/weewx-data/skins/Rsync. Copying new skin Standard into /Users/tkeffer/weewx-data/skins/Standard. Copying new skin Ftp into /Users/tkeffer/weewx-data/skins/Ftp. Copying new skin Mobile into /Users/tkeffer/weewx-data/skins/Mobile. Copying new skin Seasons into /Users/tkeffer/weewx-data/skins/Seasons. Unable to find the WeeWX executable 'weewxd'. No daemon utility files will be created. Make sure the pip user directory (typically ~/.local/bin) is in your PATH, then retry. Removing /Users/tkeffer/weewx-data/docs. Copying new docs into /Users/tkeffer/weewx-data/docs. Removing directory /Users/tkeffer/weewx-data/examples. Copying new examples into /Users/tkeffer/weewx-data/examples. Creating a new 'user' directory at /Users/tkeffer/weewx-data/bin/user. Save the configuration file to /Users/tkeffer/weewx-data/weewx.conf. On Mon, Jan 16, 2023 at 11:25 AM Vince Skahan <[email protected]> wrote: > Yes. That's it. > > ### uncomment to clean up previous runs > # rm -rf ~/.local > # rm -rf ~/.cache > cd > python3 -m pip install weewx --user > ~/.local/bin/weectl station create --driver weewx.drivers.simulator > --no-prompt > > > On Monday, January 16, 2023 at 11:08:50 AM UTC-8 Tom Keffer wrote: > >> Just want to make sure I understand the sequence you used. >> >> - Fresh copy of Debian with no ~/.local/bin. >> - Installed WeeWX using pip. >> - Got the warning about ~/.local/bin not in your path. >> - So, invoked weectl using an absolute path. >> >> Is that about right? >> >> Yes, we could search the same directory as weectl. >> >> On Mon, Jan 16, 2023 at 10:27 AM Vince Skahan <[email protected]> wrote: >> >>> FIWW, I'd just do it my way and explain why. Then it won't matter what >>> their startup files do. >>> >>> This one is a bit unusual because weectl calls weewxd under the hood, so >>> not having your PATH set up before you call weectl means no go. >>> >>> We've trained users for a decade to '*when in doubt use an absolute >>> pathname*' which has always worked before. Not any more it seems... >>> >>> Using an absolute pathname: >>> >>> ~/.local/bin/weectl station create --driver weewx.drivers.simulator >>> --no-prompt >>> The configuration file will be created at >>> /home/vagrant/weewx-data/weewx.conf. >>> Traceback (most recent call last): >>> File "/home/vagrant/.local/bin/weectl", line 8, in <module> >>> sys.exit(main()) >>> File "/home/vagrant/.local/lib/python3.10/site-packages/weectl.py", >>> line 52, in main >>> namespace.func(namespace) >>> File >>> "/home/vagrant/.local/lib/python3.10/site-packages/weectllib/parse_station.py", >>> line 117, in create_station >>> weecfg.station_config.station_create(config_path=namespace.config, >>> File >>> "/home/vagrant/.local/lib/python3.10/site-packages/weecfg/station_config.py", >>> line 64, in station_create >>> config_config(config_path, dist_config_dict, weewx_root=weewx_root, >>> *args, **kwargs) >>> File >>> "/home/vagrant/.local/lib/python3.10/site-packages/weecfg/station_config.py", >>> line 104, in config_config >>> copy_util(config_path, config_dict) >>> File >>> "/home/vagrant/.local/lib/python3.10/site-packages/weecfg/station_config.py", >>> line 522, in copy_util >>> raise FileNotFoundError("Cannot find weewxd") >>> FileNotFoundError: Cannot find weewxd >>> >>> FWIW, a very ugly way 'does' work: >>> >>> $ PATH=~/.local/bin:$PATH weectl station create --driver >>> weewx.drivers.simulator --no-prompt >>> The configuration file will be created at >>> /home/vagrant/weewx-data/weewx.conf. >>> >>> Suggestion - if you can alter weectl to realize weewxd is in the same >>> directory it's in, perhaps the good 'ol "*use an absolute pathname*" >>> method will still work and we won't have to do special training on this >>> one. As-is it's going to cause a lot of the 'command not found - what do I >>> do' things we get flooded with on the -user group. >>> >>> >>> On Monday, January 16, 2023 at 3:39:47 AM UTC-8 Tom Keffer wrote: >>> >>>> On Sun, Jan 15, 2023 at 8:11 PM Vince Skahan <[email protected]> >>>> wrote: >>>> >>>>> WARNING: The scripts weectl and weewxd are installed in >>>>> '/home/vagrant/.local/bin' which is not on PATH. >>>>> Consider adding this directory to PATH or, if you prefer to suppress >>>>> this warning, use --no-warn-script-location. >>>>> >>>>> I worked around it with a quickie script for ubuntu 2204... >>>>> >>>> >>>> The reason you're getting a warning is that most .profiles look like >>>> this: >>>> >>>> if [ -d "$HOME/.local/bin" ] ; then >>>> PATH="$HOME/.local/bin:$PATH" >>>> fi >>>> With a virgin system there is no ~/.local/bin, so it's not put in your >>>> PATH. After installing WeeWX there is. >>>> >>>> We could tell people to "source .profile" if they get the error, but >>>> there are so many different combinations of .profile, .bashrc, .zsh, etc, >>>> that I'm reluctant to do that. I'll just include a warning in the pip >>>> install instructions. >>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-development" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-development/2f77dcb7-603e-4a01-8432-b74b4ceaf2c1n%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-development/2f77dcb7-603e-4a01-8432-b74b4ceaf2c1n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "weewx-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-development/2714b0e5-9a96-41c9-9e6d-1f1351ae8457n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-development/2714b0e5-9a96-41c9-9e6d-1f1351ae8457n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEBnJbvieEL6s4mMAXynEu%3DDuEAX4X1AJYgjRA3aaoBPEg%40mail.gmail.com.
