Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda site-packages

After installing a package in an anaconda environment, I'll like to make some changes to the code in that package.

Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages

like image 779
Nyxynyx Avatar asked Jun 23 '15 13:06

Nyxynyx


People also ask

Where are site packages Anaconda?

conda-develop ~/anaconda2/envs/[my_env]/site-packages.

How do I search for packages in Anaconda?

Navigate to the Environments page. In the dropdown to the left of Channels, select All to search all packages on anaconda.org. In the Search Packages box, type the name of the package you want to search for on anaconda.org.


2 Answers

You can import the module and check the module.__file__ string. It contains the path to the associated source file.

Alternatively, you can read the File tag in the the module documentation, which can be accessed using help(module), or module? in IPython.

like image 178
Arcturus B Avatar answered Oct 01 '22 18:10

Arcturus B


Run this inside python shell:

from distutils.sysconfig import get_python_lib print(get_python_lib()) 
like image 37
Vlad Costin Avatar answered Oct 01 '22 19:10

Vlad Costin