swcarpentry / python-novice-gapminder

Plotting and Programming in Python
http://swcarpentry.github.io/python-novice-gapminder/
Other
163 stars 427 forks source link

Anaconda linux install works, but instructed commands to start do not #574

Open tautme opened 2 years ago

tautme commented 2 years ago

source step is missing from linux install instructions for anaconda

I recently started going through the install instructions for SC Python Plotting and Programming. https://swcarpentry.github.io/python-novice-gapminder/ After downloading and installing in the command line, the jupyter lab command didn't work.

I believe adding 'source ~/.bashrc will solve the install problem https://swcarpentry.github.io/python-novice-gapminder/setup.html

Then the command to start is conda followed by selecting "jupyter lab" in the GUI. https://docs.anaconda.com/anaconda/install/linux/

The command jupyter lab does not work in Ubuntu 20.04.3 LTS

Please give me feedback as to:

  1. add the commands to existing instructions?
  2. rewrite the instructions to follow the anaconda documented install process?
alee commented 2 years ago

:wave: @tautme

Thanks for the note! And sorry for the delayed response. I just went through the Linux install and it worked for me though I had to answer "yes" to the last question about running conda init and follow their final instructions to close and re-open your current shell for the changes to take effect.

From the tail end of the anaconda3 installer output:

---snip---

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Working with Python and Jupyter notebooks is a breeze with PyCharm Pro,
designed to be used with Anaconda. Download now and have the best data
tools at your fingertips.

PyCharm Pro for Anaconda is available at: https://www.anaconda.com/pycharm

>>> elapsed time 2m26s  

This command is the important one though:

% conda config --set auto_activate_base true # or false if you don't want conda to auto activate on every shell

That said, if you had answered no and didn't already have conda in your path then you're right, you would need to source the conda activate script, e.g.,

% source ~/anaconda3/bin/activate

before you can run any conda commands.

We would welcome a pull request for this if you'd like to help clarify the Linux install instructions. I think we originally pulled these from the carpentries workshop template repository: https://carpentries.github.io/workshop-template/#python