Executing "python setup.py install" inside an iPython notebook

ShanZhengYang

I recently downloaded some software that requires one to change to the directory with python files, and run python setup.py install --user in the Terminal.

One then checks whether the code is running correctly by trying from [x] import [y]

This works on my Terminal. However, when I then try from [x] import [y] in the notebook, it never works. So, this makes me think I must install the setup.py file within the iPython notebook.

How does one do this?

rth

No, installing a python module in the terminal is sufficient. There is not such thing as installing within the IPython notebook.

Simply restart your IPython notebook after the install. If it still does not work, you are probably not using the same python interpreter between the two: check python version (which python), make sure you are not using a virtual environment, and that $PYTHON_PATH is not somehow different, etc.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related