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.
