Python Forum
installation directory of modules in python3.7
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installation directory of modules in python3.7
#1
when we install numpy or any other packages with pip command on windows,
where exactly the numpy files are getting stored in path...
how do we locate those files with help of python command??

and also how to check details functions of any package eg:numpy with
python command
Reply
#2
(Jul-11-2019, 11:14 AM)srm Wrote: when we install numpy or any other packages with pip command on windows,
where exactly the numpy files are getting stored in path...
It get stored in site-packages folder eg C:\Python37\Lib\site-packages\numpy
Quote:how do we locate those files with help of python command??
Python locate it for you when using import,you never need to go yourself to site-packages folder.
C:\
λ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>>
>>> np.arange(15).reshape(3, 5)
array([[ 0,  1,  2,  3,  4],
       [ 5,  6,  7,  8,  9],
       [10, 11, 12, 13, 14]])
How it work as looked upon from outside.
Windows find Python when it set in Environment Variables Path,this get done automatically under install if mark on eg Add Python 3.7 to PATH
Python finds files(module/package) by looking in sys.path.
>>> import sys
>>>
>>> sys.path
# List get back here is where Python look
srm Wrote:and also how to check details functions of any package eg:numpy with
python command

From command line:
C:\
λ pip show numpy
Name: numpy
Version: 1.16.3
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: c:\python37\lib\site-packages
Requires:
Required-by: wxPython, pyxel, pandas, moviepy, matplotlib, imageio
From interpreter:
C:\
λ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>>
>>> np.__version__
'1.16.3'
Reply
#3
or in your favorite interpreter:

>>> import numpy
>>> help(numpy)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can prepare the modules when compiling python3.11? luofeiyu 1 523 Sep-28-2023, 03:50 PM
Last Post: deanhystad
  How to see the date of installation of python modules. newbieAuggie2019 4 1,464 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  I can not get python3 to work... frustrating... something about directory? pythonforumuser 1 1,872 Jan-31-2020, 05:45 PM
Last Post: snippsat
  Python3/Flask/LDAP-Active Directory tundrwd 1 31,022 Dec-13-2019, 05:48 PM
Last Post: Clunk_Head
  Installation Error:Tribon conflicted with Python3.8? sam2016 12 5,577 Dec-10-2019, 05:11 AM
Last Post: sam2016
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,823 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE
  How to know modules contained by python3 library sylas 3 5,145 Sep-04-2018, 01:40 PM
Last Post: sylas
  Python3: problem to import personals modules PyForIO 2 3,449 Mar-04-2018, 12:42 PM
Last Post: PyForIO
  Python3 installation and venp error sunilgt 1 3,843 Jul-25-2017, 01:29 AM
Last Post: nilamo
  Modules issue, pip3 download modules only to pyhton3.5.2 not the latest 3.6.1 bmohanraj91 6 8,351 May-25-2017, 08:15 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020