GladeVCP and venv?

  • JetForMe
  • JetForMe's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
28 Jan 2023 05:38 - 28 Jan 2023 05:40 #263072 by JetForMe
GladeVCP and venv? was created by JetForMe
I've been working on my VCP outside of GladeVCP/LinuxCNC by creating a little scaffold.py GTK app to display my UI (I don't yet interface with the HAL so this was easy). I'm able to run in debug mode in VS Code and it speeds development.

Now I'm trying to integrate into my VCP (instead of launching scaffold.py), and I'm having some trouble getting gladevcp (or linuxcnc, for that matter) to respect my venv when they launch, which means it can't find my dependencies that I'm developing in conjunction with the VCP.

With my venv activated, I did
pip install -e ~/mymodule

which put a mymodule.egg-link file in the venv site-packages directory pointing to the local mymodule directory in my home dir.

Any idea what I can do to make this work?
Last edit: 28 Jan 2023 05:40 by JetForMe.

Please Log in or Create an account to join the conversation.

  • JetForMe
  • JetForMe's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
28 Jan 2023 14:45 #263119 by JetForMe
Replied by JetForMe on topic GladeVCP and venv?
I've used `update-alternatives` to make python3.11 the system-wide python, but gladevcp still launches python3.9. How is gladevcp finding python?

Please Log in or Create an account to join the conversation.

  • JetForMe
  • JetForMe's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
28 Jan 2023 15:27 - 28 Jan 2023 15:27 #263121 by JetForMe
Replied by JetForMe on topic GladeVCP and venv?
Ah! Linux filesystems are case-dependent, but macOS is (usually) not. So my import API statement was failing to find api.py when on Linux.

Still want to figure out how to run linuxcnc/gladevcp with a different python, though.
Last edit: 28 Jan 2023 15:27 by JetForMe.

Please Log in or Create an account to join the conversation.

More
10 Mar 2025 10:15 #323612 by low-blip
Replied by low-blip on topic GladeVCP and venv?
Did you figure it out? I want to use a Rust library in my VCP, but I only know how to install it as a package in a virtual environment.

Please Log in or Create an account to join the conversation.

  • JetForMe
  • JetForMe's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 Mar 2025 19:06 #323642 by JetForMe
Replied by JetForMe on topic GladeVCP and venv?

Did you figure it out? I want to use a Rust library in my VCP, but I only know how to install it as a package in a virtual environment.
 

Oh gosh, I can't remember! It's been so long since I worked on that project! I’m definitely using a venv, but I'm not sure I was able to switch the Python interpreter.

Please Log in or Create an account to join the conversation.

Moderators: HansU
Time to create page: 1.275 seconds
Powered by Kunena Forum