Questions tagged [site-packages]

site-packages is the target directory of manually built Python packages (where Python installs its modules).

When you build and install Python packages from source you will find the installed modules in a folder named site-packages by default.

The standard installation location can be found here (see also installation documentation):

Unix (pure):

# prefix/lib/pythonX.Y/site-packages
/usr/local/lib/pythonX.Y/site-packages

Unix (non-pure):

# exec-prefix/lib/pythonX.Y/site-packages
/usr/local/lib/pythonX.Y/site-packages

Windows:

# prefix\Lib\site-packages
C:\PythonXY\Lib\site-packages

When you run Python, the module search path sys.path usually includes a directory whose path ends in "site-packages". This directory is intended to hold locally-installed packages available to all users using a machine or a particular site installation.

See PEP-370 for more information about "Per user site-packages directory", and this tutorial about virtual environments to see that the installation location can be different (isolated in that case).

108 questions
2
votes
0 answers

Pip won't install packages in Venv that are also in system site-packages

I realize this topic has so many other SO answers but I haven't been able to find one for my specific problem. I am using python 3.7 on windows and create my virtual environments using venv. When I activate my virtual environment and call pip list…
2
votes
1 answer

"easy_install setuptools" is installing setuptools into different site-package?

I'm currently using centos web admin. I tried to change default python version from 2 into 3. I already done it as you can see from the result below: [root@srv ~]# which python /usr/bin/python [root@srv ~]# python -V Python 3.6.8 [root@srv ~]#…
Kevin A.S.
  • 123
  • 7
2
votes
0 answers

PyInstaller does not include the kivy.garden.mapview package.What is the workaround?

Python Version: 3.6.7(Anaconda Environment) Kivy Version: 1.10.1 So I installed mapview with the command garden install mapview and my python file easily detects it and runs it.But when I make exe with PyInstaller it showed the following error…
5cube
  • 57
  • 9
2
votes
0 answers

"KeyError: 'PYTHONPATH'". Sites.py broken in python3?

I think this got foobarred when I was doing some brew update stuff. Everytime my system python3 is called, it emits: Error in sitecustomize; set PYTHONVERBOSE for traceback: KeyError: 'PYTHONPATH' This is particularly annoying because I use…
LiavK
  • 702
  • 6
  • 20
2
votes
1 answer

How to extend sys.path using files?

I'm using a python environment (iOS Pythonista) that does not have setuptools so setup.py within a python packages will not run. There is a site-packages dir that is added to sys.path. I'm looking for a clever way to gunzip packages from pypi into…
briarfox
  • 525
  • 5
  • 13
1
vote
0 answers

Installing python packages in Namecheap CPanel (Python App)

I was trying to install a flask-based app on my website everything was fine, until i got this error when i was installing the library's with a requirements.txt: error: subprocess-exited-with-error × Getting requirements to build wheel did not run…
aadrian
  • 45
  • 4
1
vote
0 answers

Cannot install python ldap

I've been trying to install python-ldap for a good while now. I've tried both these commands: pip3 install python-ldap pip install python-ldap And I get the same error after installing Microsoft Build tools (I am on windows 11). I'm not too sure…
danielliucs
  • 61
  • 2
  • 6
1
vote
1 answer

How do I change the directory where pip installs packages?

I have a ploblem where pip installs packages in the wrong directory: C:\Users\mikke\AppData\Roaming\python\python311\sitepackages, but my python is installed in C:\Program Files\Python311. I'm pretty new to python and use pycharm as my IDE, the…
1
vote
0 answers

Can I import Lua files directly from within Python code?

I'm new to Python and using Pycharm. I have an application in Python and I wan't to be able to import Lua files and use them(the functions, variables and etc.) from within Python. Searching in google I found this website…
Tamar
  • 11
  • 1
1
vote
1 answer

I have the site-packages for Python 3.8 but not the interpreter

I have this path in my mac: /usr/local/lib/python3.8/site-packages but I don't have /usr/local/bin/python3.8, which should be the interpreter. Currently, my pip3 install command would install packages into /usr/local/lib/python3.8/site-packages, but…
GItaf
  • 11
  • 3
1
vote
1 answer

How to rename the site-package using pip install git +"git repo"?

How to give a specify site package name when doing following command: pip install git+"git_repo" I can see that "dremio_client" is successfully install under site package, but I want it call "dremio_client_test". -python -external libraries …
carterlin
  • 15
  • 6
1
vote
0 answers

Trouble with loading 'FuncAnimation' from matplotlib.animation

I need to import FuncAnimation from matplotlib.animation, but I am failing with the following error code: "ImportError: cannot import name 'FuncAnimation' from 'matplotlib.animation'…
PinkyBrain
  • 19
  • 5
1
vote
1 answer

Why does PyPi (pip) try to delete site-packages when uninstalling a package?

Here's what happens when I try to uninstall a package: (soothsayer_py3.8_env) jespinozlt2-osx:Prototype jespinoz$ pip uninstall soothsayer Found existing installation: soothsayer 2020.5.1 Uninstalling soothsayer-2020.5.1: Would remove: …
O.rka
  • 29,847
  • 68
  • 194
  • 309
1
vote
1 answer

Manually install a directory of python packages

My normal packages are located in /usr/local/lib/python2.7/dist-packages I have another loose hanging folder named dist-packages that contains several custom python packages taken from a different VM. Does anyone know if a simple cp the contents of…
Linsu Han
  • 135
  • 1
  • 8
1
vote
3 answers

How to move Python virtualenv to different system (computer) and use packages present in Site-packages

I am making a python 3 application (flask based) and for that I created a virtualenv in my development system, installed all packages via pip and my app worked fine. But when I moved that virtualenv to a different system (python3 installed) and ran…