jupytercad / JupyterCAD-FreeCAD

BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Freecad not found freecad functionality is completely broken #9

Closed ChunkyPanda03 closed 2 weeks ago

ChunkyPanda03 commented 7 months ago

Opening .FCStd files are completely broken, I have installed all versions of the the jupytercad stuff and none are able to run .FCStd files. image I would try your jupyter server however your server either doesn't have it set up or is broken as well.

My current setup is a headless debian server with jupyter notebook running in a venv.

how to reproduce: pip install jupytercad jupytercad_app jupytercad_core jupytercad_freecad jupytercad_lab this yeilds

Package                   Version
------------------------- --------------
aiosqlite                 0.20.0
annotated-types           0.6.0
anyio                     4.3.0
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 2.4.1
async-lru                 2.0.4
attrs                     23.2.0
Babel                     2.14.0
beautifulsoup4            4.12.3
bleach                    6.1.0
certifi                   2024.2.2
cffi                      1.16.0
charset-normalizer        3.3.2
comm                      0.1.4
contourpy                 1.2.0
cycler                    0.12.1
debugpy                   1.8.1
decorator                 5.1.1
defusedxml                0.7.1
executing                 2.0.1
fastjsonschema            2.19.1
fonttools                 4.50.0
fqdn                      1.5.1
freecad-stubs             1.0.17
h11                       0.14.0
httpcore                  1.0.4
httpx                     0.27.0
idna                      3.6
ipykernel                 6.29.3
ipython                   8.22.2
isoduration               20.11.0
jedi                      0.19.1
Jinja2                    3.1.3
json5                     0.9.24
jsonpointer               2.4
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.6.1
jupyter_collaboration     1.2.1
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.4
jupyter_server            2.13.0
jupyter_server_fileid     0.9.1
jupyter_server_terminals  0.5.3
jupyter-ydoc              1.1.1
jupytercad                1.0.1
jupytercad_app            1.0.1
jupytercad_core           1.0.1
jupytercad_freecad        1.0.0
jupytercad_lab            1.0.1
jupyterlab                4.1.5
jupyterlab_darkside_theme 0.1.2
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.4
kiwisolver                1.4.5
lesscpy                   0.15.1
MarkupSafe                2.1.5
matplotlib                3.8.3
matplotlib-inline         0.1.6
mistune                   3.0.2
nbclient                  0.10.0
nbconvert                 7.16.2
nbformat                  5.10.3
nest-asyncio              1.6.0
nodejs                    0.1.1
notebook                  7.1.2
notebook_shim             0.2.4
numpy                     1.26.4
optional-django           0.1.0
overrides                 7.7.0
packaging                 24.0
pandas                    2.2.1
pandocfilters             1.5.1
parso                     0.8.3
pexpect                   4.9.0
pillow                    10.2.0
pip                       23.0.1
platformdirs              4.2.0
ply                       3.11
prometheus_client         0.20.0
prompt-toolkit            3.0.43
psutil                    5.9.8
ptyprocess                0.7.0
pure-eval                 0.2.2
pycparser                 2.21
pycrdt                    0.8.16
pycrdt-websocket          0.12.7
pydantic                  2.6.4
pydantic_core             2.16.3
Pygments                  2.17.2
pyparsing                 3.1.2
python-dateutil           2.9.0.post0
python-json-logger        2.0.7
pytz                      2024.1
PyYAML                    6.0.1
pyzmq                     25.1.2
QtPy                      2.4.1
reacttrs                  0.1.4
referencing               0.34.0
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.18.0
scipy                     1.12.0
Send2Trash                1.8.2
setuptools                66.1.1
six                       1.16.0
sniffio                   1.3.1
soupsieve                 2.5
stack-data                0.6.3
terminado                 0.18.1
tinycss2                  1.2.1
tornado                   6.4
traitlets                 5.14.2
types-python-dateutil     2.9.0.20240316
typing_extensions         4.10.0
tzdata                    2024.1
uri-template              1.3.0
urllib3                   2.2.1
wcwidth                   0.2.13
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.7.0
y-py                      0.6.2
yjs-widgets               0.3.4
ypy-websocket             0.12.4
ypywidgets                0.4.1

jupytercad_freecad is always one version behind don't know if that matters... however I do have freecad installed from the debain apt repo so it is a bit older.

FreeCAD 0.20.2, Libs: 0.20.2R
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Aborted

I have tried with and without venv but freecad functionality is totally borked, unless there is something wrong with what I am doing something wrong please label that freecad functionality as broken. A possible solution is to have it automatically grab and run a freecad appimage if I currently have a version issue.

hours wasted 4

ChunkyPanda03 commented 7 months ago

was looking yesterday is the only way that you want freecad installed with is mamba?

trungleduc commented 7 months ago

Hi @ChunkyPanda03, thanks for reporting the issue. Indeed installing FreeCAD with mamba is the easiest way to make it work since we need to call FreeCAD's python API. If you install FreeCAD from Debian, you need to make sure that you can import its Python API from your Python environment.

ChunkyPanda03 commented 7 months ago

There is the freecadcmd that is installed from apt but is it possible to expose the api through the appimage instead? I have not tried mamba however I am not opposed to doing it. I also see that the latest version of freecad (21.2 as of writing this) is offered I will attempt to install using mamba.

However I must ask because I did symbolically link the freecad commands "freecad" and "freecadcmd" to the venv bin as well as ran it outside of the the venv, what is the version of freecad required to run this?

trungleduc commented 7 months ago

We don't use the Freecad command but its Python APIs, you may need to set up some environment variables so that JupyterCAD can import the Freecad module. This blog https://pythoncvc.net/?p=869 may help you.

SylvainCorlay commented 2 weeks ago

Closing as answered!

Thank your for opening the ticket.