Reputation: 519
After I install the package transformer by pip install transformer
, I find it under three locations.
/home/jinggu/anaconda3/bin/transformers
/home/jinggu/anaconda3/lib/python3.7/site-packages/transformers-2.1.1.dist-info/*
/home/jinggu/anaconda3/lib/python3.7/site-packages/transformers/*
What is the difference between these three?
Upvotes: 0
Views: 921
Reputation: 76750
The two in site-packages
are for the metadata about the package (transformers-2.1.1.dist-info/
) and the actual source code (transformers/
). The file in the bin/
folder is called an entry point and represents a commandline interface provided by the package. In this case, you can see this defined in the setup.py
file and that it points to running the main()
function.
Upvotes: 1
Reputation: 218
The anaconda3/bin
folder contains executables installed w/ the package. If packages would like to provide a command line interface they will come with binaries to be executed from the command line. Not sure what transformers is, but if you navigate to anaconda3/bin/
you should be able to ./transformers -flags or cla's
.
The python3.7/site-packages/
folders contain the python source code that can be imported to be used in your projects. This is generally how anaconda packages are used - and how you use the packaged libraries through conda's environment.
In your case, the transformers package came with binaries as well as the source code (to be imported
for use in your projects).
Upvotes: 1