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
  Help repeately prompting for directory name if it already exists. hikerguy62 3 250 Aug-05-2019, 01:43 PM
Last Post: ichabod801
  OS module and file/directory recovery hikerguy62 1 85 Aug-02-2019, 06:42 AM
Last Post: Gribouillis
  How do I set the path to my module one directory below my python 3.7.3 program? deac33 1 70 Jul-30-2019, 04:13 AM
Last Post: Larz60+
  Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv Thisisaline 6 230 Jul-19-2019, 04:58 PM
Last Post: snippsat
  Trouble importing modules on a new python version snackman_barry 2 140 Jul-12-2019, 11:15 AM
Last Post: snackman_barry
  Raspberry - Python 3.7 - Installation trouble madjo1983 2 182 Jul-07-2019, 02:06 AM
Last Post: DeaD_EyE
  Home Directory pgoosen 7 301 Jul-05-2019, 10:23 AM
Last Post: DeaD_EyE
  Find a given file recursively inside a directory alinaveed786 1 199 Jul-01-2019, 01:53 PM
Last Post: ichabod801
  Import Python Modules zowhair 4 236 Jun-27-2019, 06:30 AM
Last Post: Gribouillis
  importing modules PiaNa 1 139 Jun-24-2019, 12:50 PM
Last Post: ichabod801

Forum Jump:


Users browsing this thread: 1 Guest(s)