Comments (6)
Hi,
I was able to find the cause of this. In mercury.py celery is started using subprocess.popen. This somehow starts celery with some other python interpreter, not the one that had my editable package installed.
I also saw that the notebook cells are executed using the execnb package. I am not sure if execnb will take the interpreter from the kernel.json to execute the code cells.
Pull request 395 solves my issue.
from mercury.
Hi @robert-elles,
My workflow is as follow:
- Create a virtual env and activate it.
- Add virtual env as a kernel to Jupyter. I'm doing it with command
python -m ipykernel install --user --name my_env
- Start mercury server in the current terminal, mercury should use the current virtual env.
Please let me know if it works for you.
from mercury.
Hi,
thanks but it didn't help. Somehow it keeps using the jupyter from my global system python installation and not the local one.
from mercury.
Hi @robert-elles,
Could you please provide me a screenshot from your terminal when you run mercury? Please also try to run the command python -c "import sys; print(sys.path)"
to check your environment paths.
from mercury.
I found out the import error is only about packages that are installed in editable mode. So it actually is using the local jupyter install but it cannot import packages from the same project that are editable packages.
If I run jupyter nbconvert --execute ./notebook.ipynb --to html --no-input
it works and everything can be imported. But running merucry run
from the same terminal and folder leads to the import error.
When I run python -c "import sys; print(sys.path)"
the path of the library I want to import is there.
from mercury.
I've just merged #395 - thank you!
from mercury.
Related Issues (20)
- PDF widget not function properly HOT 6
- Progress bars for long-running notebooks?
- Problem Installing with PyYaml=6.0 HOT 1
- Problem when set worker state <Response [404]> HOT 5
- Create the table widget! HOT 1
- Disable page refresh on disconnect? HOT 1
- Documentation on how to compile frontend code for building from source? HOT 1
- Option to hide specific cells/output HOT 1
- Add url_key to the Note widget.
- Difficult to figure out docker-compose HOT 1
- Running mercury notebook with '--no-browser' option HOT 2
- Clear old docs HOT 1
- Options for displaying notebooks in home view
- add api key for users HOT 1
- Add privacy policy for each site
- How to prevent reload of preceding cells when changing widget value and/or make ipywidgets work? HOT 3
- Add check if notebook is still waiting for worker
- Table show incorrect
- Open sidebar arrow placement HOT 2
- Initial display on mobile devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mercury.