Do you need to install Conda on an SSH server but don’t know how? You’re in the right place! This guide will walk you through the process step by step. No technical jargon—just clear, simple instructions.

Why Install Conda on an SSH Server?

Conda is a powerful package manager. It helps you manage dependencies and environments easily. Whether you work with Python, R, or other languages, Conda keeps your setup clean and organized.

Installing Conda on a remote server lets you run projects without cluttering system files. It also makes collaboration easier since you can share environments.

Step 1: Connect to Your Server

The first step is to connect to your SSH server. Open a terminal and type:

ssh username@your-server-ip

Replace username with your actual username and your-server-ip with the server’s IP address. Hit Enter. If prompted, enter your password.

Step 2: Download the Miniconda Installer

Instead of installing the full Anaconda, we use Miniconda. It’s lighter and faster. Run this command to download it:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

This grabs the latest Miniconda installation script.

Step 3: Run the Installer

Now, let’s install Miniconda. Run:

bash Miniconda3-latest-Linux-x86_64.sh

The installer will start. Press Enter to continue. Read the license agreement (or just skip to the bottom) and type yes to accept.

Step 4: Choose an Installation Path

The installer will ask for an installation location. The default is $HOME/miniconda3. That’s fine for most cases. Just press Enter.

If you need a custom location, enter your preferred path.

Step 5: Initialize Conda

Once installation finishes, the script asks if you want to run conda init. Type:

yes

This updates your shell settings, making Conda available right away.

If you skipped this step by accident, you can manually initialize Conda later with:

$HOME/miniconda3/bin/conda init

Step 6: Restart Your Shell

For Conda to work properly, close your terminal and reconnect via SSH:

exit
ssh username@your-server-ip

Now Conda should be active! Try this command to check:

conda --version

This should print the installed version. If you see something like conda 23.1.0, you’re good to go!

Step 7: Create and Activate an Environment

Let’s create a Conda environment. Run:

conda create --name myenv python=3.10

Replace myenv with your preferred name. You can also pick a different Python version.

Activate your new environment with:

conda activate myenv

Your command prompt should change, showing your new environment is active.

Step 8: Install Packages

Now you can install packages inside your Conda environment. For example:

conda install numpy pandas matplotlib

This installs NumPy, pandas, and Matplotlib. Feel free to add more as needed.

Step 9: Deactivating and Removing Environments

When you’re done, deactivate your environment:

conda deactivate

To remove an environment completely, use:

conda remove --name myenv --all

Final Thoughts

That’s it! You now have Conda running on your SSH server.

  • Use Conda environments to keep things organized.
  • Install packages as needed without messing up system files.
  • Enjoy a hassle-free development experience on your server!

Happy coding! 🚀

By Lawrence

Lawrencebros is a Technology Blog where we daily share about the Tech related stuff with you. Here we mainly cover Topics on Food, How To, Business, Finance and so many other articles which are related to Technology.

You cannot copy content of this page