cadCAD-org / cadCAD

Design, simulate, validate, and operate within complex systems
https://cadcad.org
MIT License
549 stars 271 forks source link

Jupyter lab and Jupyter notebook not recognising cadCAD module #252

Closed rogervs closed 3 years ago

rogervs commented 3 years ago

I am able to import cadCAD in normal python files, but not in Jupyter. The error is that the library is missing, however a !pip freeze confirms the cadCAD library is present.

I have recently done a fresh distro install, so I can not say with confidence whether or not I was able to import cadCAD on this setup previously or not, so it might be distro related.

For reference: Distro: Artix Linux pip freeze: https://gist.github.com/rogervs/062de8c08172fd2c2f015a31d5477ad9 Python version: 3.9.1

The solution was to add __init__.py to the base of the library.

JEJodesty commented 3 years ago

jupyter versions jupyter notebook 6.2.0 jupyter lab 3.0.7

JEJodesty commented 3 years ago

@rogervs I was able it import cadCAD in jupyter notebook with the following environment set up Python : 3.8.5 jupyter core : 4.7.1 jupyter-notebook : 6.3.0 jupyter lab : 3.0.12

cadCAD version 0.4.24 is staged for release and uses multi processing instead of multi threading, which was a concern mentioned in the community call. I didn't upgrade my python ver. so in the meantime try importing after installing the staged release via Build From Source in the staging branch: https://github.com/cadCAD-org/cadCAD/tree/staging

JEJodesty commented 3 years ago

Update: I was able it import cadCAD in jupyter notebook with the following environment set up Build: https://github.com/cadCAD-org/cadCAD/tree/staging Version Requirements

JEJodesty commented 3 years ago

Resolved by version 0.4.27