[IPython-dev] Installing kernels and libs under a virtual env
doug.blank at gmail.com
Tue Dec 30 12:57:50 EST 2014
Having some trouble installing a kernel and python library under a Python
virtual environment (specifically under Travis). Perhaps the root of this
is caused by the new API to install_kernel_spec. Here is the situation:
We have a Python file and kernel that we would like to install via
setup.py. If we install like:
python setup.py install
where we call:
install_kernel_spec(td, 'my_kernel', user=self.user)
from inside a class, then this works (without the venv) when called by
root, or if called with the --user flag.
However, when called from inside a virtual environment without --user, it
attempts to install the kernel in /usr/local/share/jupyter/kernels. If one
uses the --user flag in the virtual env, then it installs in ~/.local/
rather than in the virtual env's local folder. This causes issues later
because ~/.local is not in the Python search path.
I think that if "python setup.py install --user" under a venv went to the
virtual env's local, then everything would be fine. But maybe I'm doing
something wrong (need to use pip?).
Any help appreciated,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev