Bottom Page

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
Quote
#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'
Quote
#3
or in your favorite interpreter:

>>> import numpy
>>> help(numpy)
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  I can not get python3 to work... frustrating... something about directory? pythonforumuser 1 96 Jan-31-2020, 05:45 PM
Last Post: snippsat
  Python3/Flask/LDAP-Active Directory tundrwd 1 188 Dec-13-2019, 05:48 PM
Last Post: Clunk_Head
  Installation Error:Tribon conflicted with Python3.8? sam2016 12 560 Dec-10-2019, 05:11 AM
Last Post: sam2016
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 318 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE
  How to know modules contained by python3 library sylas 3 853 Sep-04-2018, 01:40 PM
Last Post: sylas
  Python3: problem to import personals modules PyForIO 2 1,011 Mar-04-2018, 12:42 PM
Last Post: PyForIO
  Python3 installation and venp error sunilgt 1 1,564 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 4,274 May-25-2017, 08:15 AM
Last Post: wavic

Forum Jump:


Users browsing this thread: 1 Guest(s)