0

Using corporate network that blocking pip -m install xxxx function. Showing the message below in CMD :

Retry xxx fail to connect xxx...

Trying to do :

  • Download the package > put in the folder > use manual method to install if it exist
  • Pass corporate network security rule if there is some code are able to do for it

R works normally for installing library (Except setting webdriver through selenium, same problem with network security problem)

I am beginner of Python. Is there another alternative solution?

James Z
  • 12,209
  • 10
  • 24
  • 44
Napbien Cole
  • 25
  • 1
  • 4
  • You can download packages as wheel files (`.whl`) then [install them locally](https://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file). I would also suggest to your IT that they whitelist the package server (https://pypi.python.org/pypi) so you can use the normal workflow. – Cory Kramer Feb 19 '18 at 13:21
  • What library? For example, numpy needs specifically compiled on your machine – OneCricketeer Feb 19 '18 at 13:21
  • You can use python -m pip install youmodule or python3 -m pip install youmodule – Narendra Feb 19 '18 at 13:22
  • 2
    Talk to your it department and get them to open the network for you. – thebjorn Feb 19 '18 at 13:22
  • @Narendra Read the question – OneCricketeer Feb 19 '18 at 13:22
  • @cricket_007 okkk thanks got it... – Narendra Feb 19 '18 at 13:26
  • Thank you CoryKramer , cricket_007 , thebjorn , Narenda . 1. When py -m pip install operate > it goes to [link]https://pypi.python.org/pypi to downloading library .--> Whistlist or opening network filter for this URL solve the problem. 2 . If USE downloading and install by manually , `py -m pip install wheel` > `py -m pip install C:\xxx\xxx.whl ` . I am going to use numpy , pandas , selenium , beautiful soup . webdriver proxy error will be another problem though . – Napbien Cole Feb 19 '18 at 14:56

1 Answers1

0

You can manually download wheel (.whl) files for Windows from this link. It contains most of the popular packages of Python for Windows Platform. Then you can install it using pip by providing the path to your .whl file:

pip install "C:\Python Packages\opencv_python-3.4.0-cp36-cp36m-win_amd64.whl"

In this example I've installed the OpenCV library which is present in Python Packages directory in C drive.

Mushif Ali Nawaz
  • 3,707
  • 3
  • 18
  • 31
  • Thankyou Mushif . Unfortunately , www.lfd.uci.edu doesn't provide .whl file for selenium . – Napbien Cole Feb 19 '18 at 15:00
  • Napbien: use [this link](https://pypi.python.org/pypi/selenium) to download .whl file for selenium. Scroll down and you'll find **selenium-3.9.0-py2.py3-none-any.whl** file. – Mushif Ali Nawaz Feb 19 '18 at 15:16