What are site packages in python and can you install / use them if you are not a root user?

I am trying to install lldb on Linux in my home directory on my system (I do not have root access) and I have encountered a problem with the step that tried to create a subdirectory in/usr/lib/python2.6/site-packages

I found a line in the Makefile that sets this variable, and it:

PYTHON_DEST_DIR := $(DESTDIR)/$(call realpath,$(shell python -c 'import sys; print sys.exec_prefix')/lib/python$(shell python -c 'import sys; print sys.version[:3]')/site-packages)

So this is not something I can specify in configure sciprt, but I can change the Makefile so that the files are copied to some place in my home directory. But I don’t quite understand what it is site-packagesor how I would point out that python should look in some alternative place for these files. Is it possible that this is possible or are there some workarounds for what I want to do?

+5
source share
3 answers

A possible solution that can help everyone is to install virtualenv . This is a python package that helps you configure some of these more annoying path redirection issues, and also gives you access to using pip and easy_install to install directly into your home directory.

This is a long route.

site-packages , , python. PYTHONPATH, . , , -prefix, , . , , .

+4

, :

site-packages - , (.. python). Linux root, .

:

virtualenv - python, , , python . virtualenv virtualenvwrapper ( ), burrito.

+7

Here is a simple code

sudo apt-get install pip

-4
source