amitkaps/weed

Some tests to run a hello world ipynb inside new virtenv

Opened this issue · 6 comments

thanks for the detailed steps in readme page...

can you give a few steps/commands, to see if the virtual environment with py-notebook is good to go...

i did,
source env/bin/activate
/usr/local/bin/jupyter console

It threw exception as,

  File "/usr/local/bin/jupyter-console", line 7, in <module>
    from jupyter_console import main

linux_requirements.txt must have jupyter_console, i think....

Good catch. ipython notebook became jupyter with the recent version. This worked on Mac. Will test on Linux and update the file.

Since we also require png and freetype, there can be simple shell script like ./test.sh which can open ipython with set of commands and check all necessary requirements.

Hi @madhavan020985 : We spent sometime figuring out the issue. We couldn't replicate this. We found this relevant issue: jupyter/jupyter_console#18

Looks like you are using an older version of pip. Please do the following:
pip install --upgrade setuptools pip pip uninstall ipykernel pip install ipykernel

Then do the following:

  1. Delete the environment folder
  2. Create a new virtual environment (as told in the setup instructions)
  3. Activate the environment
  4. Run the command again pip install -r requirements_linux.txt

To check: ipython notebook or jupyter notebook

Note: You might have to upgrade pip once again after activating the environment

oops... it looks, like jupyter console is a wrong subcommand... jupyter notebook launches my ipython server properly......

when i do jupyter notebook after activating the virtual environment, it is still using the globally installed ipython and hence, the virtual environment libraries are not available inside the notebook...

Doesn't the jupyter binary be lying inside/launched from env/bin/ folder?

Did you activate the virtual environment? If you are inside a virtual environment, it picks the local dependencies first before looking for global options. If ipython notebook works, you are good to go.

it works after i ran (env)weed$ python -m pip install ipython[notebook] inside the virtual environment..... thanks all.... jupyter binary got added into env/bin folder....