Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that installation of a Python/R/Julia package is a one-time process. You will not have to re-install it once you have installed it.

Below are some basic ways to install packages in Python, R, and Julia. We also strongly recommend using tools like conda and Python virtual environments to manage your projects.

Installing Python Packages

...

  1. Click the New drop-down menu at the top right corner and then choose Terminal.
  2. In the new browser tab with terminal access, type Type the following command in Terminal and press enter:

    Code Block
    python3 -m pip install --user PACKAGE_NAME_1, PACKAGE_NAME_2, ...
    Make sure to add --user option, which allows you to install the package in your local environment. Not doing so will return a permission error. 
  3. Check if the packages have been successfully installed.
  4. Close the tab.


  5. Check if the package has been successfully installed.
  6. Close the tab.

Notes about Python package installation

1. Please see the pip documentation for more information about using pip.


2. Installing Python packages this way, you can find your Python packages in your user library:

Code Block
/home/HawkID/.local/lib/pythonx.x/site-packages

where HawkID is your HawkID, and pythonx.x indicates the Python version, for example, Python 3.7.


3. If you are using a user-installed Python package in Terminal, you will need to add your user library to PATH. In Terminal:

First, crease a .bashrc if you haven't done so before:

Code Block
touch ~/.bashrc

Add your user library to PATH:

Code Block
echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc

And then run the following in Terminal. Note that .bashrc needs to be sourced every time you start a new Terminal session.

Code Block
source .bashrc

Installing R Packages

Using RStudio

...