I am a Python programmer, new to IPython Notebook. I have started a notebook that uses numpy
.
If I was publishing the same code as a standalone Python script, I'd include a requirements.txt
file with numpy
and its version, so that other users can install the same version into a virtualenv when they run the script.
What is the equivalent of this for iPython Notebook? I can't find anything about managing requirements in the documentation, only about the dependencies required to install IPython itself.
My requirements are that I'd like to make sure that the notebook is using a particular version of numpy
, and I want to make sure that I can publish the notebook with the same version specified.
If you have Jupyter in your requirements.txt
and you activate that environment (I recommend Virtualenv), install, and run Jupyter, you'll have all the specific versions you want. So:
python3 -m venv venv
source venv/bin/activate
(different command on Windows)
pip install -r requirements.txt
jupyter lab
(or jupyter notebook
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With