Error about Python when installing Tensorflow - python

Am have tried to download both tensorflow and tensorflow-gpu on Ubuntu16.04, it didn't work..
I was using pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
It's ok at first, but after a while it was stuck. it appears ERROR like below:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tensorflow-gpu
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ce/9a/6a3985daf15d0b87b1ef3c499293cf0889cd294223a6ca28b9529770b29e/tensorflow_gpu-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl (380.8MB)
|▍ | 4.8MB 8.0kB/s eta 13:03:00ERROR: Exception:
Traceback (most recent call last):
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 382, in run
resolver.resolve(requirement_set)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
self._resolve_one(requirement_set, req)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 313, in _get_abstract_dist_for
req, self.session, self.finder, self.require_hashes
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 194, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 465, in unpack_url
progress_bar=progress_bar
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 316, in unpack_http_url
progress_bar)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 551, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 253, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/utils/hashes.py", line 80, in check_against_chunks
for chunk in chunks:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 223, in written_chunks
for chunk in chunks:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 212, in resp_read
decode_content=False):
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 439, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
ReadTimeoutError: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Read timed out.
I have tried several times. I thought it were problem caused by pip, so I used pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu also. However, another problem came up.
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
Collecting tensorflow-gpu
Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
No matching distribution found for tensorflow-gpu
Could you do me a favor?

To install tensorflow try this
pip3 install --upgrade tensorflow
To install tensorflow-gpu try this
pip3 install tensorflow-gpu

Check your python path using
which python
If this is equal to the python's expected path
then use the following commands to install the packages.
python -m pip install tensorflow
python -m pip install tensorflow-gpu

Related

How to install torch in python

I tried pip3 install torch --no-cache-dir and, after few seconds, I got this:
Collecting torch
Downloading https://files.pythonhosted.org/packages/24/19/4804aea17cd136f1705a5e98a00618cb8f6ccc375ad8bfa437408e09d058/torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl (753.4MB)
100% |████████████████████████████████| 753.4MB 5.7MB/s
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 342, in run
requirement_set.prepare_files(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 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python3/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/lib/python3/dist-packages/pip/download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 617, in unpack_file
flatten=not filename.endswith('.whl')
File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 506, in unzip_file
data = zip.read(name)
File "/usr/lib/python3.6/zipfile.py", line 1338, in read
return fp.read()
File "/usr/lib/python3.6/zipfile.py", line 858, in read
buf += self._read1(self.MAX_N)
File "/usr/lib/python3.6/zipfile.py", line 948, in _read1
data = self._decompressor.decompress(data, n)
MemoryError
What should I do now to install PyTorch?
I tried almost every method mentioned on google. I am working on Ubuntu, I tried using conda too, but I am unable to use that package outside conda.
For pip environment use this
pip3 install torchvision
For conda environment use this (run this command on anaconda prompt)
conda install PyTorch -c PyTorch
Update
Use this code to turn off your cache
pip3 --no-cache-dir install torchvision
or
pip3 install torchvision--no-cache-dir
or
pip install --no-cache-dir torchvision
Try one by one

pip upgrade:" python -m pip install --upgrade" says already up-to-date(18.0), "pip --version" says (10.0.1)

I was trying to install some packages from PyPI through pip in "cmd" on Windows 7 as in:
C:\Users\acer\PycharmProjects\Test\venv\Scripts>pip install (some package)
But installation failed with the following message(directly as received from cmd):
Exception:
Traceback (most recent call last):
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 302, in _error_catcher
yield
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 384, in read
data = self._fp.read(amt)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\http\client.
py", line 447, in read
n = self.readinto(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\http\client.
py", line 491, in readinto
n = self.fp.readinto(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\socket.py",
line 589, in readinto
return self._sock.recv_into(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 1049, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 908, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\commands\install.py", line 291, in run
resolver.resolve(requirement_set)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 257, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
self.require_hashes
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\operations\prepare.py", line 310, in prepare_linked_require
ment
progress_bar=self.progress_bar
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 837, in unpack_url
progress_bar=progress_bar
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 674, in unpack_http_url
progress_bar)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 898, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 618, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\utils\hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 586, in written_chunks
for chunk in chunks:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\utils\ui.py", line 159, in iter
for x in it:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 575, in resp_read
decode_content=False):
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\contextlib.p
y", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 307, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files
.pythonhosted.org', port=443): Read timed out.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have tried to upgrade pip to version 18.0, so I ran python -m pip install --upgrade on cmd (Windows 7):
C:\Users\acer\PycharmProjects\Test\venv\Scripts>python -m pip install --upgrade pip
And after running it, I typed pip --version to check the version I have now:
C:\Users\acer\PycharmProjects\Test\venv\Scripts>pip --version
But the response was that I have pip version 10.0.1 :
pip 10.0.1 from c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip (python 3.7)
After running the upgrade command again, the response was pip is already up-to-date:
Requirement already up-to-date: pip in c:\users\acer\pycharmprojects\test\venv\lib\site-packages (18.0)
Why is there a difference between the two answers? And how to upgrade pip properly?

pip install packages in Python runing into errors

I am trying to install a few packages in Python. For example trying to install quantmod but was told to upgrade my pip which I did through Anaconda prompt but when I go to try and install quantmod again I get the same error message. This happens with all packages I am trying to install...
I am running pip install quantmod and to upgrade pip this python -m pip install --upgrade pip
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install quantmod
Collecting quantmod
Could not find a version that satisfies the requirement quantmod (from versions: )
No matching distribution found for quantmod
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\USER\appdata\local\programs\python\python36-32\lib\site-packages (10.0.1)
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install quantmod
Collecting quantmod
Could not find a version that satisfies the requirement quantmod (from versions: )
No matching distribution found for quantmod
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
EDIT 1 with pip install --upgrade pip:
Exception:
Traceback (most recent call last):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 487, in _prepare_file
req_to_install, finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 428, in _check_skip_installed
req_to_install, upgrade_allowed)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\USERR\Anaconda3\lib\site-packages\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>
EDIT:
(base) C:\Users\USER\AppData\Local\Programs\Python\Python36-32>pip install Gensim
Collecting Gensim
Exception:
Traceback (most recent call last):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
require_hashes
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\USER\Anaconda3\lib\site-packages\pip\index.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Install tensorflow via pip but failed just as follows

Traceback (most recent call last):<br>
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main<br>
status = self.run(options, args)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run<br>
wb.build(autobuilding=True)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build<br>
self.requirement_set.prepare_files(self.finder)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))<br>
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks<br>
for chunk in chunks:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter<br>
for x in it:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read
decode_content=False):<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream<br>
data = self.read(amt=amt, decode_content=decode_content)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 324, in read<br>
flush_decoder = True<br>
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 246, in _error_catcher<br>
raise ReadTimeoutError(self._pool, None, 'Read timed out.')<br>
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
I solved it by modifying the command like this:
pip --default-timeout=100 install THEPACKAGENAME
You can also try installing using wheel packages.
The Wheel packages depend on the kind of operating system you have, the python version and whether you want to install with CPU/GPU support.
Also upgrade you protobuf before installing Tensorflow.
Please find a list of packages here:
https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package
You can then issue this command :
$ sudo pip install --upgrade <TF wheel package URL> - For Python 2.7
$ sudo pip3 install --upgrade <TF wheel package URL> - For Python 3.x
Tensorflow site has some details on some common installation problems. You can look at those as well, just in case.
https://www.tensorflow.org/install/install_linux#common_installation_problems

Error installing virtualenv Windows

I am installing virtualenv using the following command
pip install virtualenv
and this is what is got:
C:\Users\X>pip install virtualenv
Collecting virtualenv
Using cached virtualenv-15.0.3-py2.py3-none-any.whl
Installing collected packages: virtualenv
Exception:
Traceback (most recent call last):
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\req\req_set.py", line 742, in install
**kwargs
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\req\req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\req\req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\wheel.py", line 493, in move_wheel_files
maker.make_multiple(['%s = %s' % kv for kv in console.items()])
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\scripts.py", line 383, in make_multiple
filenames.extend(self.make(specification, options))
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\scripts.py", line 372, in make
self._make_script(entry, filenames, options=options)
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\scripts.py", line 276, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\scripts.py", line 212, in _write_script
launcher = self._get_launcher('t')
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\scripts.py", line 351, in _get_launcher
result = finder(distlib_package).find(name).bytes
File "c:\users\x\appdata\local\programs\python\python36-32\lib\site-packages\p
ip\_vendor\distlib\resources.py", line 324, in finder
raise DistlibException('Unable to locate finder for %r' % package)
pip._vendor.distlib.DistlibException: Unable to locate finder for 'pip._vendor.d
istlib'
BTW i am using python 3.6. What is the problem ?
This seems to be a bug in pip under windows.
The following steps helped me solve the problem:
1. uninstall pip:
python -m pip uninstall pip setuptools
reinstall pip with [this script][1].
run get-pip.py from within your venv
This should solve it.

Categories