Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section discussing conda and Jupyter notebooks #6

Open
davidrpugh opened this issue Jun 13, 2019 · 3 comments
Open

Add section discussing conda and Jupyter notebooks #6

davidrpugh opened this issue Jun 13, 2019 · 3 comments
Labels
type:enhancement Propose enhancement to the lesson

Comments

@davidrpugh
Copy link
Collaborator

@jakevdp has an excellent blog post that summarizes the key issues.

Can this post be summarized in a callout box? Or is more discussion required?

@jakevdp
Copy link

jakevdp commented Jun 13, 2019

That post predates newer functionality; IPython 7.3 introduced pip and conda magic functions so that %conda install package essentially does what you want it to, without having to put too much thought into the issues discussed in that post.

@davidrpugh
Copy link
Collaborator Author

@jakevdp Thanks for the tip. I had always avoided installing packages from inside notebooks in favor of maintaining a single environment.yml or requirements.txt file. Installing packages from inside the notebook feels like an anti-pattern that could lead to problems. However once I started using Google Colab and Kaggle kernels I started installing packages from within Notebooks out of necessity.

I just tried to see if the %conda magic command was available via Google Colab and it appears that it is not available (the %pip magic command was available) also 'conda was not available either via !conda (guess that conda is not installed in the Docker image used by Colab?); on Kaggle conda was available using !conda from a code cell but the %conda magic command was not available.

I am considered adding a callout box encouraging the use of environment.yml files wherever possible, but use of %conda magic as the preferred method of installing packages from within a Jupyter notebook using conda (where necessary).

Would be interested in your thoughts on this.

@jakevdp
Copy link

jakevdp commented Jun 15, 2019

I think there are two different modes of work: interactive exploration & data analysis (which suits itself well to Jupyter notebooks and packages installed within the active kernel on the fly) and development of reproducible analyses & tools (which suits itself well to version-controlled .py files and well-defined & reproducible environments). I don't think either is an anti-pattern; they are modes of work that both have their place in any data science workflow.

@fmichonneau fmichonneau added type:enhancement Propose enhancement to the lesson and removed enhancement labels Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Propose enhancement to the lesson
Projects
None yet
Development

No branches or pull requests

3 participants