0

I have some offline computers which I cannot connect to the Internet. Not surprisingly, several of the modules are outdated. How do I update them and also add new ones?

I am envisioning downloading something from the Internet, putting it on a flash drive, then loading it somehow into Pycharm. This question is about the first and last steps.

Pycharm 2018, Windows 10

sameagol
  • 403
  • 6
  • 14
  • You can install with wheel file, open CMD and type -> `pip install D:/some-folder/your-file.whl` – 6LYTH3 Nov 09 '18 at 03:50

3 Answers3

2

If you look at the second most voted answer on this SO post you'll see the general way of doing it. You can do that with your virtualenv activated, then the packages should show up in PyCharm just fine

robotHamster
  • 531
  • 5
  • 21
2

You need the downloaded packages from somewhere that connected to internet then store it as via

# in case of just single package
$ pip install <package> --download <path>/offline_packages

# incase you need a list of pakages
$ pip install --download <path>/offline_packages -r requirements.txt

Tranfer the to your machine (by anyway you can)

Install these packages to your current Pycharm's Python directory via:

# single package
$ pip install --no-index --find-links="<path>/tranferred_packages" <package>

# list of dependencies
$ pip install --no-index --find-links="<path>/tranferred_packages" -r requirements.txt

Hope this can help you :)

enpi
  • 1,088
  • 1
  • 8
  • 8
  • Note- syntax has changed from "install --download" to download. Also, I have a question. When I run the command to download from a requirements file, I get this error: "Directory 'C:/.../newdirectory' is not installable. Neither 'setup.py' nor 'pyproject.toml' found." – sameagol Mar 10 '19 at 23:18
0

On a computer that has an internet connexion download your packages with :

pip download -d <download folder directory> <package name>

Then on the target computer copy the download folder then go to Pycharm's Terminal and install your packages with:

pip install --no-index --find-links <download folder directory> <package name>
infantry
  • 179
  • 3
  • 15