Murtaza Haji
Murtaza Haji

Reputation: 1193

Install python package using conda without internet

I am behind corporate firewall and want to install a python package from .bz2 file.

I verified my python version to be 3.6.5 and downloaded appropriate package from anaconda cloud

This is how i am installing the package

conda install path_to_.bz2file

The error I get

enter image description here

I saw several examples where there is mention of extracting and running the setup.py file. I didnt find any setup.py file after extraction. Maybe its related to pypi not sure. I dont have any internet connection on this machine so have to look for offline installation options.

Any help is appreciated.

Upvotes: 2

Views: 3037

Answers (1)

thorntonc
thorntonc

Reputation: 2126

PyPI distributions usually come with a setup.py. Here are the steps to download offline.

  1. Find the package you want to download on PyPI
  2. Download the latest distribution to a local directory, should be a tar.gz (tarball) file.
  3. Open Anaconda Prompt/Terminal
  4. cd to the tar.gz parent folder
  5. pip install (filename)

Sometimes a package will have dependencies that need to be installed online. In this case you will need to do the same with the dependency before you can successfuly run the setup.py

Upvotes: 1

Related Questions