Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install package in anaconda?

I want to add music package to anaconda interpreter. I'm using ubuntu 14.04 64bit. I downloaded music21-1.9.3.tar.gz from anaconda cloud. I unpacked it to anaconda3/pkgs

ext                installer.py  music21           PKG-INFO   setup.cfg
installer.command  MANIFEST.in   music21.egg-info  README.md  setup.py

I found nothing on the web, or doesn't work. How can I install it?

like image 229
Július Marko Avatar asked Mar 22 '16 20:03

Július Marko


People also ask

How do I add packages to anaconda?

Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.

How do I install conda packages?

in terminal, type : conda list to obtain the packages installed using conda.


1 Answers

Are you using Windows? If so, open up a Command Prompt window.

What I like to do is Copy the Link Address of the package that I would like to install. In this case, a simple google search lead me to a popular python package site : https://pypi.python.org/pypi/music21/1.9.3

I right-click the tar.gz hyperlink and click "Copy Link Address" to get this : https://pypi.python.org/packages/source/m/music21/music21-1.9.3.tar.gz#md5=d271e4a8c60cfa634796fc81d1278eaf

Now to install this, in your command prompt window, type the following :

pip install https://pypi.python.org/packages/source/m/music21/music21-1.9.3.tar.gz#md5=d271e4a8c60cfa634796fc81d1278eaf

or

conda install https://pypi.python.org/packages/source/m/music21/music21-1.9.3.tar.gz#md5=d271e4a8c60cfa634796fc81d1278eaf

And it should automatically download the package from that link address, unzip it, and then attempt to install it in your python environment.

It's good to know how to install python packages manually as well for distributions that don't lend themselves as easily to cross-platform auto-installations.

What you would do is unzip the tar.gz file ( or any other compressed package file ) until you have a folder directory with a "setup.py" file name. You would go into your command prompt window and "cd" into that directory.

Then you would call the Python Executable by typing "python" which lets the command prompt know that you are calling python to run your command and finish the line so in total it looks like this :

python setup.py install 

There you have it.

like image 99
RasikhJ Avatar answered Sep 26 '22 00:09

RasikhJ