How do I install caffe on debian with pip3? - python-3.x

I am trying to do pip3 install caffe, but I am getting this on Ubuntu x64 machine:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/caffe/
stiv#gaidar:~/lpr$
how can I fix it

Caffe should be installed on Ubuntu/Debian via apt-get install cafe-cpu or apt-get install cafe-gpu.

Related

Error in installation of spark NLP for Healthcare

As per https://nlp.johnsnowlabs.com/docs/en/licensed_install, the command to install spark-nlp-jsl is as below.
pip install -q spark-nlp-jsl==${version} --extra-index-url https://pypi.johnsnowlabs.com/${secret.code} --upgrade
I tried by providing a version as 3.0.2 and my {secret.code} but getting the below error:
Collecting spark-nlp-jsl==3.0.2
Exception:
Traceback (most recent call last):
status = self.run(options, args)<br/>
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run<br/>
wb.build(autobuilding=True)<br/>
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build<br/>
self.requirement_set.prepare_files(self.finder)<br/>
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files<br/>
ignore_dependencies=self.ignore_dependencies))<br/>
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file<br/>
require_hashes<br/>
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link<br/>
self.link = finder.find_requirement(self, upgrade)<br/>
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement<br/>
all_candidates = self.find_all_candidates(req.name)<br/>
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates<br/>
for page in self._get_pages(url_locations, project_name):<br/>
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages<br/>
page = self._get_page(location)<br/>
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page<br/>
return HTMLPage.get_page(link, session=self.session)<br/>
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page<br/>
resp.raise_for_status()<br/>
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status<br/>
raise HTTPError(http_error_msg, response=self)<br/>
requests.exceptions.HTTPError: 404<br/>
Client Error: Not Found for url: https://pypi.org/simple/spark-nlp-jsl/```
I am new to Python and SparkNLP so any pointer/help is much appreciated.
check that the version you use, and the first part of the secret code must match.
So,
python3 -m pip install --upgrade spark-nlp-jsl==3.0.2 --user --extra-index-url https://pypi.johnsnowlabs.com/3.0.2-XXXXXSECRETXXXXX

pip3 package installation fails with *ReadTimeoutError* regardless of default-timeout setting

The problem
On a fresh and minimal Ubuntu 20.04 installation with ufw inactive:
pip3 fails with HTTPSConnectionPool timeout.
pip3 fails to install or update any package in a freshly installed OS.
pip3 fails with the same error when installing local wheel files.
pip3 fails in both a virtual python environment and at the system-level environment.
Environment
Ubuntu 20.04 LTS
fresh install,
apt updated/upgraded
Python 3.8
Additional details
--default-timeout=100
--default-timeout=1000
UPDATE:
Traceback after user-interrupt python -m pip install -U pip
^CERROR: Operation cancelled by user
^CTraceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
sys.exit(_main())
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 75, in main
return command.main(cmd_args)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 114, in main
return self._main(args)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 226, in _main
self.handle_pip_version_check(options)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 158, in handle_pip_version_check
pip_self_version_check(session, options)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 207, in pip_self_version_check
best_candidate = finder.find_best_candidate("pip").best_candidate
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 883, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 827, in find_all_candidates
package_links = self.process_project_url(
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 792, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 612, in fetch_page
return _get_html_page(location, session=self.session)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 451, in _get_html_page
resp = _get_html_response(url, session=session)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 149, in _get_html_response
resp = session.get(
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_internal/network/session.py", line 421, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/cachecontrol/adapter.py", line 53, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/urllib3/connection.py", line 352, in connect
self.sock = ssl_wrap_socket(
File "/home/zippy/Documents/python_workspace/py_virt_env/lib/python3.8/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt
UPDATE
Sanity check - OK
laptop082:468$ curl https://pypi.org:443/simple/pip/
<!DOCTYPE html>
<html>
<head>
<meta name="pypi:repository-version" content="1.0">
<title>Links for pip</title>
</head>
<body>
<h1>Links for pip</h1>
pip-0.2.tar.gz<br/>
.
.
.
Questions
What are my options?
Will a Ubuntu re-install be necessary?
UPDATE:
Re-installation of Ubuntu 20.04 did not resolve the problem.
Please advise.

Netmiko installation error for python3 in gns3

root#NetworkAutomation-1:~# python3 -m pip install netmiko
Collecting netmiko
Using cached https://files.pythonhosted.org/packages/34/c9/ea1ed1ab4f4482a23c342ca2c767daae58e3cf35d9b2bd91ae2c9e980185/netmiko-3.0.0-py2.py3-none-any.whl
Collecting paramiko>=2.4.3 (from netmiko)
Using cached https://files.pythonhosted.org/packages/06/1e/1e08baaaf6c3d3df1459fd85f0e7d2d6aa916f33958f151ee1ecc9800971/paramiko-2.7.1-py2.py3-none-any.whl
Collecting setuptools>=38.4.0 (from netmiko)
Using cached https://files.pythonhosted.org/packages/a7/c5/6c1acea1b4ea88b86b03280f3fde1efa04fefecd4e7d2af13e602661cde4/setuptools-45.1.0-py3-none-any.whl
Collecting pyserial (from netmiko)
Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Collecting scp>=0.13.2 (from netmiko)
Using cached https://files.pythonhosted.org/packages/4d/7a/3d76dc5ad8deea79642f50a572e1c057cb27e8b427f83781a2c05ce4e5b6/scp-0.13.2-py2.py3-none-any.whl
Collecting textfsm (from netmiko)
Using cached https://files.pythonhosted.org/packages/bd/27/0b149b6da3e47cc8daebace6920093114392171a8f5c24f1f2ad9a9e9c4d/textfsm-1.1.0-py2.py3-none-any.whl
Collecting pynacl>=1.0.1 (from paramiko>=2.4.3->netmiko)
Using cached https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz
Complete output from command python setup.py egg_info:
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 23, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 49, in run
_build_ext.run(self)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 174, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v9jxsgyk/cffi-1.13.2/setup.py", line 248, in <module>
"Programming Language :: Python :: Implementation :: PyPy",
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1087, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 246, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v9jxsgyk/cffi-1.13.2/setup.py", line 248, in <module>
"Programming Language :: Python :: Implementation :: PyPy",
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lo_w_8rl/pynacl/setup.py", line 255, in <module>
"Programming Language :: Python :: 3.7",
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 663, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 873, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1089, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lo_w_8rl/pynacl/
You are using pip version 8.1.1, however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Python pip3 install StringIO Not Found for url: https://pypi.org/simple/stringio/

I am running python version 3.6.9 and pip3 version 9.0.1. when i execute the command
pip3 install StringIO
It returns the error
Collecting StringIO
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/stringio/
Do you know how to fix this error.
Manny thank
Erik
Python3 String IO is a built-in function in the IO module. To work with this module
i must use:
from io import StringIO
You don't need to use pip3:
Use:
import io
hi = io.StringIO("hi")

Fail to install pip in Python3.6

When I wanted to install pip, the error just came out:
C:\Users\xd>python get-pip.py install
Collecting install
Exception:
Traceback (most recent call last):
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\req\req_set.py", line 554, in _prepare_file
require_hashes
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\req\req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\cachecontrol\adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\adapters.py", line 423, in send
timeout=timeout
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 589, in urlopen
self._prepare_proxy(conn)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 797, in _prepare_proxy
conn.connect()
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\packages\urllib3\connection.py", line 254, in connect
conn = self._new_conn()
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\packages\urllib3\connection.py", line 142, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Users\xd\AppData\Local\Temp\tmpf2uneu6f\pip.zip\pip\_vendor\requests\packages\urllib3\util\connection.py", line 66, in create_connection
if host.startswith('['):
AttributeError: 'NoneType' object has no attribute 'startswith'
What can I do?
For recent Python versions (3.4+), you don't need to use the get-pip.py script anymore. Just run python -m ensurepip, and the ensurepip module will do everything the get-pip.py script used to do.

Resources