Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not import flax in self hostet jupyter notebook #1

Closed
sungam94 opened this issue Feb 4, 2021 · 3 comments
Closed

can not import flax in self hostet jupyter notebook #1

sungam94 opened this issue Feb 4, 2021 · 3 comments

Comments

@sungam94
Copy link

sungam94 commented Feb 4, 2021

Hi,
thanks to anyone involved publishing this.
I managed to get the video extraction notebook running after installing heaps of packages missing from the 'requirements.txt'.

Now I'm stuck in the second notebook, trying to import flax.
Running the following in the same cell yields:

!python -c "import flax; print(flax)"
import flax

<module 'flax' from '/opt/conda/envs/nerfies/lib/python3.8/site-packages/flax/init.py'>

ModuleNotFoundError Traceback (most recent call last)
in
1 get_ipython().system('python -c "import flax; print(flax)"')
----> 2 import flax
ModuleNotFoundError: No module named 'flax'

Does anyone reading this have a clue what's up?
Cheers,
Magnus

@keunhong
Copy link
Collaborator

keunhong commented Feb 4, 2021

Hi Magnus,

Which packages were missing from requirements.txt?

For flax, did you install the flax package? You can do that by doing pip install flax.

@sungam94
Copy link
Author

sungam94 commented Feb 4, 2021

I did install flax, the line

!python -c "import flax; print(flax)"

in a notebook cell works. See above.

The missing packages might be the ones which are preinstalled in google colab like "plotly, nbformat, pandas openexr".
Might be useful to have another requirements file for the jupyter notebook outside of colab.
The current requirements.txt has everything necessary to run the .py files i guess.

@keunhong
Copy link
Collaborator

keunhong commented Feb 4, 2021

Oh right, sorry. The requirements.txt are enough to run the command line and the nerfies library but doesn't have all the dependencies for the notebooks. Any chance you could share your package state by doing pip freeze > requirements.txt?

For the Jupyter issue, could this be relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants