Hi folks, I was helping at a Python workshop workshop yesterday and in general I see learners launch the Anaconda Jupyter notebook from the Anaconda GUI instead of the terminal.
One such user on Mac OSX had launched the notebook from the Anaconda GUI but had import errors. However, if I had him install the packages from inside the notebook using "! pip install pandas", the installation succeeded but the import errors continued. This was a little surprising, because that workaround succeeded in the past. I'm assuming that the shell bang pip command inside the cell invokes pip associated with the running python's PATH, but maybe that's a false assumption and there is a more sensible to install packages for the running notebook python version. It's also possible that the Anaconda GUI had selected a virtual environment and that pip installed the package globally instead of into the environment. Has anyone run into something similar and what is the correct way you would go about installing a package from a running notebook? Unfortunately I'm mostly familiar with pip / pipenv instead of conda and don't often use notebooks in my work. I know that I could have also had the user not use the Anaconda GUI and run the jupyter notebook from the terminal, but in the past I've also encountered situations where users have multiple Anaconda and Miniconda installations where one has to mangle the ~/.bash_profile and was therefore hesitant to go down that road and opted to instead work within the context of using the Anaconda GUI that the user is already familiar with. Pariksheet ------------------------------------------ The Carpentries: discuss Permalink: https://carpentries.topicbox.com/groups/discuss/T72d9652a490be7d3-Me32abccb4262ecc1eb389d93 Delivery options: https://carpentries.topicbox.com/groups/discuss/subscription
