Installing modules to Anaconda from .tar.gz

There are several ways to achieve this, I’m describing one here, which should be relatively straight forward, even if your default python variable is not anaconda’s.

  1. Check what is your desired anaconda environment (if you’re not sure what does this mean, it probably means that you are using root, the default environment)
  2. Run: conda info --envs to see the path where your environment is installed
  3. Go to that path, and find the absolute path to python.exe, for example:
    "C:\Program Files\Anaconda3\python.exe"
  4. Now, run the following command:

<absolute path to python.exe> -m pip install <path to tar.gz>

for example:

C:\Program Files\Anaconda3\python.exe -m pip install c:\mymodule\great.tar.gz

Note that <path to tar.gz> can be relative, absolute and even an online link.

Leave a Comment