Agree. Your install.py should 'not' be run under sudo, you also need to 
modify it to be able to copy and symlink into /usr/local/bin (which 
requires sudo).

Why aren't the /usr/local/bin items simply installed and running out of the 
bin/user directory ????

On Sunday, July 14, 2024 at 10:51:48 AM UTC-7 Dominic Reich wrote:

> I doubt `sudo` should be used here.
>
> Karen K <[email protected]> wrote:
>
> >One user tried to install [1]weewx-DWD into an WeeWX installation made by 
> pip.
> >The error messages refer to files of core WeeWX:
> >
> >
> >
> > (weewx-venv) user@pc:~$ sudo weectl extension install weewx-dwd.zip
> > [sudo] Passwort für user:
> > Error parsing config file: Unable to find file 'weewx.conf'. Tried
> > directories ['/root/weewx-data', '/etc/weewx', '/home/weewx']
> > Traceback (most recent call last):
> > File "/usr/share/weewx/weeutil/startup.py", line 86, in start_app
> > config_path, config_dict = weecfg.read_config(config_option, 
> [config_arg])
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/usr/share/weewx/weecfg/init.py", line 147, in read_config
> > config_path = find_file(option_path, args, locations=locations, 
> file_name=
> > file_name)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "/usr/share/weewx/weecfg/init.py", line 104, in find_file
> > raise OSError(f"Unable to find file '{file_name}'. Tried directories
> > {locations}")
> > OSError: Unable to find file 'weewx.conf'. Tried directories ['/root/
> > weewx-data', '/etc/weewx', '/home/weewx']
> >
> >
> >I have no glue what happens there. The messages say, that weewx.conf 
> could not
> >be found. Looking for that file is not part of install.py. 
> >
> >Unfortunately I cannot try the installation myself actually. And I have no
> >experience with weewx-venv.
> >
> >See [2]install.py here.
> >
> >There is a configure() method in this case, which is not widely used. But 
> there
> >is no reference to weewx.conf in it. I would have expected that the 
> copying and
> >linking in it may fail within a virtual environment, but the error 
> messages say
> >otherwise.
> >
>
> -- 
> Life is really simple, but we insist on making it complicated.
> - Confucius
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b1525a1e-174d-43f7-b6d3-a5f3ab994cc9n%40googlegroups.com.

Reply via email to