Code Monkey home page Code Monkey logo

Comments (10)

Arksine avatar Arksine commented on July 24, 2024 2

FWIW, I should have a resolution for this issue pushed soon. It is part of a series of patches I plan to push, one of which clients need to adapt before I do so. When they are ready this should work without a symlink.

from moonraker.

gdachs avatar gdachs commented on July 24, 2024 1

gdachs@x5sapro:~/moonraker-env/lib$ ls -l
insgesamt 4
lrwxrwxrwx 1 gdachs gdachs 9 Jan 25 00:07 python3.7 -> python3.8
drwxrwxr-x 3 gdachs gdachs 4096 Jan 25 00:07 python3.8

from moonraker.

Arksine avatar Arksine commented on July 24, 2024 1

I'm currently working on significant changes to the update manager and part of it actually removes the dist_path. The bad news is that instead of symlinking the gpiod module in the virtualenv I append the dist path to sys.path before importing it in the power module. If you don't use Moonraker to toggle gpios then this won't be an issue for you, otherwise we may need to hardcode different locations to test for the gpiod module. Sadly we cant use site.getsitepackages() due to a limitation set by the virutalenv.

That said, officially the update manager only supports debian and its derivatives as this is what I dev on and test against. I'm not opposed to supporting other distros in the future and would be happy to accept PRs toward this goal. This is something that should definitely wait until my currrent changes are merged as the refactor the the update manager is fairly significant (it adds a beta channel that deploys Moonraker and Klipper in a zipped file).

from moonraker.

gdachs avatar gdachs commented on July 24, 2024

I have the same issue. The missing package is installed but in /home/gdachs/moonraker-env/lib/python3.8/site-packages. IIRC Python 3.8 was a requirement of KlipperScreen.

I could fix it by editing the file scripts/update_manager.conf, but now the update manager considers moonraker as dirty of course. So this is not a real solution.

Okay, I fixed it for me by adding a symlink instead.

from moonraker.

turtiustrek avatar turtiustrek commented on July 24, 2024

Okay, I fixed it for me by adding a symlink instead.

symlink to what exactly? The directory to the python3.8 folder or update_manager.conf.

from moonraker.

menelike avatar menelike commented on July 24, 2024

As a workaround, you can align the path in

env_package_path: lib/python3.7/site-packages
to python3.8 (or python3.9 in my case). I think env_package_path should ideally be generated dynamically.

and you gotta deal with the nasty message in fluidd if you're a perfectionist:

image

from moonraker.

gdachs avatar gdachs commented on July 24, 2024

As a workaround, you can align the path in

env_package_path: lib/python3.7/site-packages

to python3.8 (or python3.9 in my case). I think env_package_path should ideally be generated dynamically.
and you gotta deal with the nasty message in fluidd if you're a perfectionist:

image

This is exactly what I described in my first post.

from moonraker.

dimalo avatar dimalo commented on July 24, 2024

For the perfectionists:
I've just updated my docker image of klipper/moonraker to get rid of the message:

Assuming you have python 3.9 (moonraker venv as well) and you don't have it installed under /usr/lib/python3, you have to issue two commands to symlink an existing python3.9 in /usr/local/lib:

mkdir -p /usr/lib/python3 && ln -s /usr/local/lib/python3.9/site-packages /usr/lib/python3/dist-packages

# export HOME=/home/klippy
mkdir -p ${HOME}/moonraker-env/lib/ && ln -s ${HOME}/moonraker-env/lib/python3.9 ${HOME}/moonraker-env/lib/python3.7

now moonraker doesn't feel dirty anymore...

from moonraker.

Arksine avatar Arksine commented on July 24, 2024

This issue has been fixed, however you all will need to remove your symlinks for it to work correctly. It uses Python's "glob" package to determine the correct directory for the site-packages, however if glob returns more than one directory moonraker won't know which one to use. It sees the symlink as an additional directory, so that will confuse it.

from moonraker.

knoopx avatar knoopx commented on July 24, 2024

related to this is python_dist_path which points to /usr/lib/python3/dist-packages. I'm not using debian and dist-packages is a debian-specific convention. There's currently no way of disabling it other than modifying update_manager.conf and getting dirty status.

from moonraker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.