Assembly3 py-slvs failed [Errno 13]

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
sleepyspecter
Posts: 2
Joined: Thu Dec 15, 2022 3:56 am

Assembly3 py-slvs failed [Errno 13]

Post by sleepyspecter »

I'm having an issue installing py-slvs on the RealThunder branch that I haven't found anywhere else. It's the edge release snap for Pop!_OS; updated 13 December 2022. I'm not sure if not being able to access /etc/os-release is the real issue, or if something else is going on, but I've tried every solution I could find so far to no avail.

Let me know if there's any other info I should provide. Any help is greatly appreciated.

Code: Select all

00:51:38  1.381229 <asm3.main> init_gui.py(14): no solver backend found
00:51:45  FreeCAD 0.20, Libs: 2022.1213R14555 (Git shallow)
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
Adding snap-specific PYTHONPATH to sys.path: /home/ryan/snap/freecad-realthunder/common/.local/lib/python3.8/site-packages:/snap/freecad-realthunder/97/lib/python3.8/site-packages:/snap/freecad-realthunder/97/usr/lib/python3/dist-packages

00:51:45  >>> >>> >>> >>> ... ... ... ... ... ... 
ERROR: Exception:
Traceback (most recent call last):
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 326, in run
    session = self.get_default_session(options)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/network/session.py", line 343, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/network/session.py", line 140, in user_agent
    linux_distribution = distro.name(), distro.version(), distro.codename()
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 297, in name
    return _distro.name(pretty)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 842, in name
    self.os_release_attr("name")
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 1032, in os_release_attr
    return self._os_release_info.get(attribute, "")
  File "/snap/freecad-realthunder/97/usr/lib/python3.8/functools.py", line 967, in __get__
    val = self.func(instance)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 1070, in _os_release_info
    with open(self.os_release_file, encoding="utf-8") as release_file:
PermissionError: [Errno 13] Permission denied: '/etc/os-release'
Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    self.handle_pip_version_check(options)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 179, in handle_pip_version_check
    session = self._build_session(
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/network/session.py", line 343, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_internal/network/session.py", line 140, in user_agent
    linux_distribution = distro.name(), distro.version(), distro.codename()
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 297, in name
    return _distro.name(pretty)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 842, in name
    self.os_release_attr("name")
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 1032, in os_release_attr
    return self._os_release_info.get(attribute, "")
  File "/snap/freecad-realthunder/97/usr/lib/python3.8/functools.py", line 967, in __get__
    val = self.func(instance)
  File "/snap/freecad-realthunder/97/lib/python3.8/site-packages/pip/_vendor/distro/distro.py", line 1070, in _os_release_info
    with open(self.os_release_file, encoding="utf-8") as release_file:
PermissionError: [Errno 13] Permission denied: '/etc/os-release'
>>> 

Code: Select all

OS Name: Pop!_OS 22.04 LTS
OS Type: 64-bit
GNOME Version: 42.5
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly3 py-slvs failed [Errno 13]

Post by adrianinsaval »

you might get a faster response if you create an issue on realthunder's github repo
sleepyspecter
Posts: 2
Joined: Thu Dec 15, 2022 3:56 am

Re: Assembly3 py-slvs failed [Errno 13]

Post by sleepyspecter »

That makes sense. I wasn't quite sure about the relationship between FreeCAD and the RealThunder branch. I'll take my question there. Sorry, for the unnecessary post.
timetofly
Posts: 10
Joined: Sun Jul 09, 2023 1:25 am

Re: Assembly3 py-slvs failed [Errno 13]

Post by timetofly »

Apologies for replying to an old thread, but it came up on Google when searching for the same problem of installing py_slvs using a Snap installation on Pop!_OS. My workaround was to install the snap in dev mode.

Code: Select all

sudo snap install freecad-realthunder --devmode --channel=latest/edge
Note that this bypasses the inherent security built in to snap by giving it access to the whole filesystem, but I'm okay with that as I trust the FreeCAD application.

Replace the channel value with

Code: Select all

latest/beta
to get the latest "tip" releases.
nicocesar
Posts: 2
Joined: Tue Oct 04, 2022 10:03 pm

Re: Assembly3 py-slvs failed [Errno 13]

Post by nicocesar »

I found this bug: https://bugs.launchpad.net/snapd/+bug/1881189 I hope in the future they solve it, in the meantime devmode work around will get it done with the security caviat
Post Reply