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
0
votes
1 answer

Not able to import a module that is already installed

I am trying to import a module "requests" but it shows the following error File "manager.py", line 12, import requests ModuleNotFoundError: No module named 'requests' Then I also verified the pip list using python -m pip list and it includes…
0
votes
0 answers

Using and editing Python Site-packages

I'm using a package that I would like to be able to edit directly instead of appending views and functions to the package from my project. How would I do this? Can I copy the package into my project/root - or is this bad? I tried moving the package…
Plewis
  • 119
  • 10
0
votes
1 answer

How to execute the right Python to import the installed tensorflow.transform package?

The version of my Python is 2.7.13. I run the following in Jupyter Notebook. Firstly, I installed the packages %%bash pip uninstall -y google-cloud-dataflow pip install --upgrade --force tensorflow_transform==0.15.0 …
0
votes
1 answer

How to correctly create a symbolic link to the Python interpreter?

On Ubuntu 18.04, I installed Python 3.7 and a virtual environment in /home/sss/dev/venv/3.7 The venv site packages are in /home/sss/dev/venv/3.7/lib/python3.7/site-packages - ~/dev/venv/3.7/bin/python -m site sys.path = [ '/home/sss/dev', …
user2309803
  • 541
  • 5
  • 15
0
votes
2 answers

How to import site package's module instead of one in current directory that has the same name (python 3.x)?

I am heavy user of the pandas library. In order to keep useful custom made helper functions related to pandas library, I decided to create a custom project (my_proj) and a module pandas.py in it. Now I am developing another custom module related…
user3225309
  • 1,183
  • 3
  • 15
  • 31
0
votes
1 answer

No lib64 directory in python virtualenv with WSL

I am using WSL on windows 10. I created a python3.6 virtual environment using virtualenv. When trying to import the "arcade" library I'm getting the following error: Unable to find match for ffmpeg sound library at expected location:…
0
votes
0 answers

Can't import Selenium package

I've definitely downloaded Selenium but why can't I import Selenium?? PATH of Selenium is C:\Users\공용장비-02\AppData\Local\Programs\Python\Python37\Lib\site-packages\selenium
1Sun
  • 2,305
  • 5
  • 14
  • 21
0
votes
2 answers

Lib not uninstalling from site packages (Python)

I accidentally installed a lib site package and I am unable to remove it. When I run my python script, it is unable to import a file as it is looking for my file in the wrong directory. from lib import mailparser // This is the line of the code that…
0
votes
1 answer

package installation from Github doesn't work (maybe problem with .egg file)

Can't get Pycharm to recognize an installed package from GitHub. Using GitHub desktop i've downloaded a depository 'mesa-reader' and ran inside the repository: python setup.py install Then, i tried to add this package in Pycharm to the project…
dor00012
  • 362
  • 4
  • 17
0
votes
0 answers

Provide additional location of site-packages to Python

We provide a Python 27 version with some preinstalled packages with the rest of our application to the users by putting everything on a shared drive. We work in Windows environment. We’d like another team to maintain a set of extra packages that…
Michał Fronczyk
  • 1,859
  • 4
  • 24
  • 29
0
votes
2 answers

how to locate source code path from module

I have a python package built from source code in /Document/pythonpackage directory /Document/pythonpackage/> python setup.py install This creates a folder in site-packages directory of python import…
kkawabat
  • 1,530
  • 1
  • 14
  • 37
0
votes
1 answer

Can I copy and paste software packages from my old Python 3.6.3 to the /Lib/site-packages directory of a newly installed Python 3.7.4?

I want to have the same packages installed on the new version of Python (3.7.4) which I just installed as I do in my old version of Python (3.6.3) such as: Numpy, pandas, opencv, mathplotlib, etc, etc. Is there an quick & easy way of doing this?…
wuddadid
  • 90
  • 7
0
votes
0 answers

Include Python Site-package in project folder

I've copied some site-packages to my projects subfolder. I want to force python to import numpy from project directory with: from project_packages import numpy as np Unfortunately during compilation i get error that refers to main site-packages…
mPayne
  • 23
  • 4
0
votes
2 answers

Downloaded module with Anaconda, but it's not found in Pycharm environment

I successfully downloaded 'geohash' module using Anaconda. I confirmed it works by testing a line of code in Jupyter notebook. However, in Pycharm, it cannot find the geohash module. I see the module 'geohash' clearly is in my Anaconda…
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81
0
votes
1 answer

Setting python3 PYTHONHOME

I installed python3 and pip3 using: RUN apt install -y build-essential libssl-dev libffi-dev python3-dev RUN apt install -y python3-pip For some reason site-packages are showing up like this: root@5d6f29f1d4e9:/usr/local/lib/python2.7# ls -a . .. …
user5047085