I'm using docker in my Mac.
Dockerfile:
#Dockerfile,Image,Container
FROM python:3.8
ADD main.py .
ADD test.py .
ADD spy511282022.csv .
RUN pip install requests pandas sqlalchemy
RUN pip list
CMD ["python","./test.py"]
My question is where are the packages sqlalchemy and requests located ,where are the directory ,because I want to modify some code of these package ,so I want to know where they have been installed.
Another question is ,can I customize the installation path and directory ?
Packages are installed in /usr/local/lib/<python version>/site-packages/<package name>/.
for example, the requests package for python 3.12 is located in:
/usr/local/lib/python3.12/site-packages/requests/
You can also run pip show requests from within your docker container which should return the package location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With