Open ThaL3g3nd27 opened 8 months ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
So this got run through on Discord and is a disconnect with our internal wheel logic at LSIO for python the solution was to:
sudo apt-get update && sudo apt-get install -y python3-virtualenv
unset VIRTUAL_ENV
https://discord.com/channels/354974912613449730/1217968478393470986
I am split on the issue because this is supposed to be a GUI container where you use the GUI, and scripts work in the GUI.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
Current Behavior
Python scripts do not work in the docker container cli.
Traceback (most recent call last): File "", line 8, in
FileNotFoundError: [Errno 2] No such file or directory: '/lsiopy/bin/activate_this.py'
Expected Behavior
freecadcmd file.py
python function should run without the gui.
Steps To Reproduce
https://github.com/ThaL3g3nd27/issue-FreeCad-freecadcmd.git
LinuxServer/FreeCad – freecadcmd not working in cli
steps previous debugged ending with issue
All Code is available
1) Add Dockerfile:
2) Add the docker-compose.yaml
3) Build the Docker Image
4) Run the image using docker-compose
5) Open Browser to localhost:3000
App works great
6) Open the boxtest.py within the FreeCad Gui
7) Run the Code in the FreeCad Gui
8) Box object is made
And auto exported/downloaded as a box.step file in /py_scripts
Python works Great!
(If Needed) shutdown container -
docker compose down
ISSUE THE CLI doesn't WORK
9) Delete the box.step file so we know if the python script was ran again.
10) Docker Exec into the running container
docker exec -it freecad bash
11) cd into the py_scripts directory
12) Open the freecadcmd cli to make sure it works
This is due to Python environment variables…
Correct Example Usage:
https://youtu.be/RQW723n3DkU?si=dIt7jef6VmLHqkaF&t=596
Purpose of the issue:
The Purpose of doing it from the command line is to automate the creation of the object defined by parameters/database so a backend can parametrically make parts. The gui will only be used for testing.
Link to linuxServer/FreeCad:
https://github.com/linuxserver/docker-freecad.git
Environment
CPU architecture
x86-64
Docker creation
Container logs