L
L
larrabee2014-05-10 20:30:56
linux
larrabee, 2014-05-10 20:30:56

Where to put python library in ubuntu?

There is ubuntu, a python3 script and a class library imported into the script. The script is in /usr/bin/. In which folder would it be better to put a lib, so that it would not be lost when updating packages and would not interfere in /usr/bin/. Ubuntu has folders /usr/lib/python3.2/ (my version of python) and /usr/lib/python3/. As far as I understand, if you put it in the 1st folder, then when a new version of python is released, the lib will be lost. Is it ok to put it in /usr/lib/python3/? Are there better options?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DOOMer, 2014-05-10
@larrabee

/usr/lib/python3/site-packages/<name_of_your_lib>
Better yet, use virtualenv and don't "litter" system directories with third-party files (third-party - installed bypassing the standard ubunt package manager).

L
lega, 2014-05-15
@lega

Can be installed in the user folder, see pip install --user ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question