What happens after you install a library via Pip?

Sorry for such a dumb question…

After I run pip and install any Python library e.g. pip install {some-library} etc

…and this ends up at C:/Python37/Lib/site-packages/{some-library}

am I right in assuming essentially pip has just unpacked here and thats it, as in there are no other operations taking place like writing to Windows registry etc, so I could in theory after running all my pip installs lift the folder C:/Python37 to another machine and it will all work as long as the environment is the same?

Hi Brendan,

From my understanding pip downloads the packages from https://pypi.org/ so to emulate that you could download manually the whl and zip files for all the packages you need then pip might be able to install from a local folder. I’ve never tried it but it might help in your situation.

e.g. https://pypi.org/project/robotframework/#files

FYI - it’s not a dumb question if you learn from it. :grin:


Could it work? Potentially. Will it be a huge pain to figure out if it doesn’t? Most definitely.

I would strongly suggest looking into proper Python environment and package management. You could start here:

My personal recommendation would be to take it a step further and also use virtual environments. My preferred tool at present for Python project configuration is https://python-poetry.org.
You may not fully understand all that’s going on under the hood when you start with poetry, but that’ll come in time and if you just follow the documentation on the site, you’ll avoid a lot of headaches.

HI Rob,

The problem Brendan is facing (he mentioned it in another thread) is that the machine he is trying to run robotframework on has no internet access, so installing libraries has been a bit of a challenge for him.

I don’t know where he is working, but having worked for several financial institutions and law enforcement departments myself, I have experienced this situation before so I understand his pain.


Hi Brendan,

I found this: python - How to install packages offline? - Stack Overflow

Hope it helps,



I was looking at something like ProGet Package management system to get all the required dependencies online but when I come to do the install in the offline environment something tells me i’ll just have the same problem…

Actually this is not working as expected:

  1. I collected RIDE using requirements.txt
  2. Installed using pip install robotframework-ride- --no-index --no-deps
  3. ran ride.py and got wx ModuleNotFoundError: No module named 'wx'

So I don’t think running pip download -r requirements.txt even got the required wx version for RIDE which is wxPython==4.0.7.post2

Is this something I’m missing with my pip commands? I’m using pip not pip3

Hi Brendan,

Following that thread there seems to be a few different approaches, but this is the one I think will work best for you

On the machine with internet access

  • first try pip --version and check your pip command is using python 3.? if not switch to using pip3
  • pip install the packages you want on this machine and make sure they run how you want.
    – anything else
  • next run pip freeze > requirements.txt to generate a requirements.txt with all the packages installed on this machine (the packages you want and their dependancies)
  • next review the generated requirements.txt and add/remove anything you think will or wont need (don’t be too agressive in removing stuff, better to have the package and not need it than need it and not have it)
  • then create a directory for pip to download packages to for example i’ll pretend you called this directory pip-offline
  • now run pip download -r requirements.txt -d pip-offline, this should download all the packages in requirements.txt to the pip-offline directory (you may need to use the full path c:\path\to\pip-offline)
  • check the pip-offline has all the python packages your are expecting
  • copy requirements.txt into pip-offline and then create a zip file of this folder (pip-offline.zip)
  • copy pip-offline.zip to a USB key or external hdd

On the machine with no internet access

  • copy pip-offline.zip from the a USB key or external hdd
  • extract pip-offline
  • pip install -r pip-offline/requirements.txt --no-index --find-links pip-offline (again you may need to use the full path c:\path\to\pip-offline)

Hopefully with that you should have what you need installed.

if it doesn’t work show me the the output of these commands from both machines and i’ll try to figure out why for you.