Hello, I used pip and installed a module…I think. I can’t seem to locate it. When I tried to install it again the display reads “Requirement already satisfied”. It gives a file path but, when I follow it, the module is no where to be found. I followed the directions at the site where I found the module so I am not sure why I am not seeing it. Thank you.
Is there any particular reason you are wanting to go to a module’s (package’s) directory?
Generally, your packages are either installed globally, in which case, you can
import module_name anywhere in your system. Or, they are installed within the directory your ran the
pip install command, in which case, you can only import the package from within that directory.
Without any more information (folder structure, package name, general aim) we cannot really help you any more.
I wish I knew more, but I don’t. I am trying to follow along with a training video on youtube and the gentleman is teaching about “Modules and pip”. I followed exactly as he did however, it didn’t yield the same results. I don’t even know what a module (packages) directory is. I was just trying to install a python-docx module and learn how to use it. I used pip and it said that it was loaded however, I cannot find it. I am looking in Python 3.8 (Downloads)>Lib>site-packages just like the guy in the video.
https://www.youtube.com/watch?v=rfscVS0vtbw this is the video.
Import the module and look at its
__file__ property. For example, with the boto3 module:
>>> import boto3 >>> boto3.__file__ '/home/chuck/.local/lib/python3.8/site-packages/boto3-1.13.26-py3.8.egg/boto3/__init__.py'
It’s different on every system, depending on how a module was installed and who installed it.