google / nerfies

This is the code for Deformable Neural Radiance Fields, a.k.a. Nerfies.
https://nerfies.github.io
Apache License 2.0
1.64k stars 221 forks source link

can not import flax in self hostet jupyter notebook #1

Closed sungam94 closed 3 years ago

sungam94 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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?