Search code examples
jupyter-notebookdrake

How can I open Jupyter Notebook in venv to make my drake work correctly?


I install drake via pip in venv and I want open files from course underactuated.

I start venv by typing:

source env/bin/activate

Drake installed correct because of output of python3 -c 'import pydrake.all; print(pydrake.__file__)':

(env) dmitriy@dmitriy:~/git/underactuated$ python3 -c 'import pydrake.all; print(pydrake.__file__)'
/home/dmitriy/env/lib/python3.8/site-packages/pydrake/__init__.py

But when I try run it in Jupyter Notebook with Kernel env I have:

ModuleNotFoundError                       Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import pydrake.all; print(pydrake.__file__)

ModuleNotFoundError: No module named 'pydrake'

How can I open Jupyter Notebook in venv to my make drake work correctly?


Solution

  • This is because I have not installed Jupyter / IPython in my virtualenv.

    This is the solution: Running Jupyter notebook in a virtualenv: installed sklearn module not available