Asked by:
Can not use pip with visual studio python tools. Keep receiving errors

Question
-
I am native Linux user and developer, but as I now use Windows 10 at work I have more than a little trouble doing what are normally the most basic tasks on my personal machine. I have created a python project from existing code but need to install the required modules for it. I try to do this as per MSDN instructions by accessing Tools->Python Tools-> Python Environments.
The process seems rather self explanitory however, when I try to upgrade pip I recieve this error :
Cannot fetch index base URL https://pypi.python.org/simple/
I recieve the same error when trying to pip install NumPy
The module I really need at the moment though id from a github repository and not on PyPi. Normally I would just install it like so
pip install https://github.com/s4w3d0ff/python-poloniex/archive/v0.4.7.zip
but this returns a different error. The full output is in my pip error log just like this
C:\Python34\lib\site-packages\pip\__main__.py run on 04/12/18 15:00:30Downloading/unpacking https://github.com/s4w3d0ff/python-poloniex/archive/v0.4.7.zipCleaning up...Exception:Traceback (most recent call last): File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 493, in urlopen body=body, headers=headers) File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 291, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Python34\lib\http\client.py", line 1090, in request self._send_request(method, url, body, headers) File "C:\Python34\lib\http\client.py", line 1128, in _send_request self.endheaders(body) File "C:\Python34\lib\http\client.py", line 1086, in endheaders self._send_output(message_body) File "C:\Python34\lib\http\client.py", line 924, in _send_output self.send(msg) File "C:\Python34\lib\http\client.py", line 859, in send self.connect() File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connection.py", line 159, in connect **self.conn_kw) File "C:\Python34\lib\socket.py", line 491, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "C:\Python34\lib\socket.py", line 530, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno 11002] getaddrinfo failedDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 327, in send timeout=timeout File "C:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 543, in urlopen raise MaxRetryError(self, url, e)pip._vendor.requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /s4w3d0ff/python-poloniex/archive/v0.4.7.zip (Caused by <class 'socket.gaierror'>: [Errno 11002] getaddrinfo failed)During handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "C:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "C:\Python34\lib\site-packages\pip\req.py", line 1197, in prepare_files do_download, File "C:\Python34\lib\site-packages\pip\req.py", line 1375, in unpack_url self.session, File "C:\Python34\lib\site-packages\pip\download.py", line 546, in unpack_http_url resp = session.get(target_url, stream=True) File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 468, in get return self.request('GET', url, **kwargs) File "C:\Python34\lib\site-packages\pip\download.py", line 237, in request return super(PipSession, self).request(method, url, *args, **kwargs) File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 456, in request resp = self.send(prep, **send_kwargs) File "C:\Python34\lib\site-packages\pip\_vendor\requests\sessions.py", line 559, in send r = adapter.send(request, **kwargs) File "C:\Python34\lib\site-packages\pip\_vendor\requests\adapters.py", line 375, in send raise ConnectionError(e, request=request)pip._vendor.requests.exceptions.ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /s4w3d0ff/python-poloniex/archive/v0.4.7.zip (Caused by <class 'socket.gaierror'>: [Errno 11002] getaddrinfo failed)
Does anyone know what the problem may be?
- Moved by Jack Zhai-MSFTMicrosoft contingent staff Wednesday, April 18, 2018 6:09 AM Python issue
Friday, April 13, 2018 5:43 PM
All replies
-
Hi Rimann,
Since this issue is related to the Python, if possible, you could post an issue here:
https://github.com/Microsoft/PTVS/issues
There you would get dedicated support.
Based on the error messages, other community members discussed this issue here:
Best Regards,
Jack
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, April 16, 2018 6:27 AM