Решил переустановить питон. Соответственно пришлось скачивать модули. Перед этим решил обновить pip:
pip install --upgrade pip
Выдало такую ошибку:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Отказано в доступе: 'C:\Users\Семья\AppData\Local\Temp\pip-uninstall-ciw3j_dd\pip.exe'
Consider using the `--user` option or check the permissions.
-
Вопрос заданболее двух лет назад
-
20174 просмотра
Скорее всего нет прав. Добавьте аргумент:--user
Надо запустить CMD от имени админа и ввести туда pip install —upgrade pip, работает. сам проверил
Пригласить эксперта
я пишу в эту тему, потому что оч долго пытался гуглить свою ошибку в инете, но эта информация не лежит на поверхности и первый источник по запросу эта тема.: наш любимый роскомик решил заблокировать неугодные ipшники и вместе с ними попал под раздачу https://files.pythonhosted.org/ . ERROR заключается в том, что при попытке обновить pip или скачать библиотеку через pip ( в моем случае до v20.3) нужен уже обновленный pip — маразм чистой воды. Но на https://habr.com/ru/info/welcome/feed/?back_link=h… (том же habr) я нашёл реальную причину. Можете прочесть но самый простой способ — vpn. Моя ошибка была следующей: ***4 раза error удаленный сервер не отвечает на запрос*** и WARNING: You are using pip version 20.2.1; however, version 20.3 is available. You should consider upgrading via the ‘C:pythonpython.exe -m pip install —upgrade pip’ command.
сам cmd подсказывает как правильно., а именно от админа подать команду
python.exe -m pip install --upgrade pip
-
Показать ещё
Загружается…
13 июн. 2023, в 17:10
3000 руб./за проект
13 июн. 2023, в 17:07
10000 руб./за проект
13 июн. 2023, в 17:05
2500 руб./за проект
Минуточку внимания
Upgrading pip does not do anything, just tells me to upgrade Pip again and that the requirements are satisfied—however, I am on an old pip version. This is Python27, I get the same issue whether I am in a virtual environment or not.
Output:
C:Python27>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:python27libsite-packages
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Versions Installed:
$ pip --version
pip 9.0.1 from c:python27libsite-packages (python 2.7)
$ pip --version
pip 9.0.1 from c:usersaroytikhdevflask-tutorialvenvlibsite-
packages (python 2.7)
(venv)
asked Jul 16, 2019 at 16:47
AlexAlex
4661 gold badge7 silver badges19 bronze badges
2
I think it how to update pip will help you and make sure that you are running command prompt as Administrator. you can do this by right click on the «Command Prompt» application and choose «Run as administrator» and type this command in your command prompt.
python -m pip install -U pip
try this if it isn’t working for you..
- Download Pip 19.1.1
- Install Pip using this command
$ python -m pip install downloads/pip-19.1.1-py2.py3-none-any.whl
or if it is tar.gz file then
$ python -m pip install downloads/pip-19.1.1.tar.gz
answered Jul 16, 2019 at 17:07
2
Even though there were some similar question but none of proposed solution applied to my case. Simply, after tensorflow
installationattempting to install packages this message
"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."
like this:
But following this python -m pip install --upgrade pip
doesn’t work even with administrator level, nor this one : python -m pip install -U pip
.
(I’m using Miniconda, just as an additional information)
asked May 18, 2018 at 7:24
ShividShivid
1,2551 gold badge21 silver badges36 bronze badges
6
I think it manybe PIP command before installing TensorFlow
can be normal use, only after installation problems, probably because the new version of Python compatible with TensorFlow might be a little less, so update PIP and conda command, can fix. by command conda install pip
Shivid
1,2551 gold badge21 silver badges36 bronze badges
answered May 18, 2018 at 7:37
Leal LiLeal Li
2471 gold badge2 silver badges10 bronze badges
5
I had similar problem after installing tensorflow in windows.
pip install wasn’t working for me. pip install returned same error.
After some checks, i found that issue was with html5lib and setuptools. I have answered the same here transport_encoding solved
Basically, i reinstalled html5lib using
conda install -c anaconda html5lib
which were superseded by a higher priority channel
answered May 18, 2018 at 8:33
ItachiItachi
2,78726 silver badges34 bronze badges
@Hamidreza, use this commandpip install --upgrade pip
If it is not working, try this as alternate easy_install pip
I hope it works
answered May 18, 2018 at 7:28
4
I haven’t worked in Conda-environments for a long time but I think it was:
conda update pip
answered May 18, 2018 at 8:31
Bram VanroyBram Vanroy
26.7k23 gold badges133 silver badges237 bronze badges
After much wailing and gnashing of teeth, I found the answer here.
To install this package with conda run one of the following:
conda install -c conda-forge pip
Sample Output:
The following packages will be UPDATED:
ca-certificates: 2018.03.07-0 --> 2018.4.16-0 conda-forge
certifi: 2018.4.16-py36_0 --> 2018.4.16-py36_0 conda-forge
conda: 4.5.9-py36_0 --> 4.5.9-py36_0 conda-forge
openssl: 1.0.2o-hfa6e2cd_1 --> 1.0.2o-hfa6e2cd_1 conda-forge
pip: 10.0.1-py36_0 --> 18.0-py36_1 conda-forge
Proceed ([y]/n)? y
Downloading and Extracting Packages ca-certificates-2018 | 176 KB |
############################################################################## | 100% openssl-1.0.2o | 5.4 MB |
############################################################################## | 100% conda-4.5.9 | 654 KB |
############################################################################## | 100% certifi-2018.4.16 | 143 KB |
############################################################################## | 100% pip-18.0 | 1.8 MB |
############################################################################## | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done
(base) C:UsersUser-pc>pip --version pip 18.0 from C:devAnaconda3libsite-packagespip (python 3.6)
answered Aug 11, 2018 at 17:09
i launch CMD as admin but get this error
(ML) C:Usersip>python -m pip install —upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init_.py», line 2862, in _dep_map
return self._dep_map
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2669, in getattr
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpackagingrequirements.py», line 93, in init
req = REQUIREMENT.parseString(requirement_string)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 1632, in parseString
raise exc
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpyparsing.py», line 3183, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 33), (line:1, col:34)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init_.py», line 2942, in init
super(Requirement, self).init(requirement_string)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpackagingrequirements.py», line 97, in init
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at «‘; extra ‘»
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «C:UsersipAnaconda3envsMLlibsite-packagespip_internalbasecommand.py», line 228, in main
status = self.run(options, args)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_internalcommandsinstall.py», line 318, in run
self._warn_about_conflicts(to_install)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_internalcommandsinstall.py», line 442, in _warn_about_conflicts
package_set, dep_info = check_install_conflicts(to_install)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_internaloperationscheck.py», line 89, in check_install_conflicts
state = create_package_set_from_installed()
File «C:UsersipAnaconda3envsMLlibsite-packagespip_internaloperationscheck.py», line 39, in create_package_set_from_installed
retval[name] = PackageDetails(dist.version, dist.requires())
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2613, in requires
dm = self.dep_map
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2864, in _dep_map
self._dep_map = self.compute_dependencies()
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2874, in compute_dependencies
reqs.extend(parse_requirements(req))
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2935, in parse_requirements
yield Requirement(line)
File «C:UsersipAnaconda3envsMLlibsite-packagespip_vendorpkg_resources_init.py», line 2944, in init
raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Invalid requirement, parse error at «‘; extra ‘»
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the ‘python -m pip install —upgrade pip’ command.
While install a package:
....................
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Ok:
$ pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 961kB/s
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Why? How to fix it?
asked Jun 29, 2018 at 10:17
3
To upgrade pip
using pip
is a bit different than regular command. Use
python -m pip install --upgrade pip
Here python -m
will read the pip
library file as a script and you will be able to update.
pomsky
66.7k20 gold badges233 silver badges243 bronze badges
answered Jul 30, 2018 at 12:30
AmitAmit
512 bronze badges
Run the command to upgrade pip as root so pip can be upgraded if it is installed in the following location:
$ pip -V pip 10.0.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
Command to upgrade pip:
sudo python -m pip install --upgrade pip
Command to upgrade pip3 (for Python 3.x):
sudo python3 -m pip install --upgrade pip
Explanation of the --upgrade
option of pip install
:
-U, --upgrade Upgrade all packages to the newest available version. This process is recursive regardless of whether a dependency is already satisfied.
answered Jun 29, 2018 at 10:50
karelkarel
109k100 gold badges266 silver badges296 bronze badges
5
If you were like me you had created a virtual environment in a project folder.
python -m venv env
So in order to make the pip upgrade work, go into the Scripts folder of the env folder.
Then run .python -m pip install --upgrade pip
.
Ditto with any pip installs. Same folder .pip install ....
The .
pins it to the command in the current folder, be it pip
or python
.
(I was doing this on Windows. But ./
would be the equivalent for Unix variants)
PS: I also ran those commands as Administrator — so sudo the commands if things fails.
answered Nov 27, 2020 at 10:22
JGFMKJGFMK
1314 bronze badges
I don’t know how it is done for pip-8 on Ubuntu-16, but I guess you could do it the same way I updated my pip-9 on Ubuntu-18 to current pip-20:
On Linux or macOS:
pip install -U pip
globally or for specific versions/installations:
python -m pip install -U pip
python3 -m pip install -U pip
python3.8 -m pip install -U pip
etc.
On Windows:
python -m pip install -U pip
Source
Cause line «python -m pip install —upgrade pip» from Installing packages using pip and virtual environments didn’t work for me.
answered Apr 11, 2020 at 19:07
__main__.py
was moved to _internal
in the later versions of python. This file should not exist in dist-packages
or .local
.
Try one of these based on what python version you are using. Then try pip2 -V
. Worst case, you can put them back.
sudo mv /usr/local/lib/python3.5/dist-packages __main__.py /tmp
pip3 -V
sudo mv /usr/local/lib/python2.7/dist-packages __main__.py /tmp
pip2 -V
sudo mv ~.local/lib/python2.7/site-packages __main__.py /tmp
Eliah Kagan
116k54 gold badges314 silver badges489 bronze badges
answered Oct 25, 2019 at 15:05
I wouldn’t worry about it unless you have a problem. I was following the Google quick start to using Python to manipulate gmail.com tonight. I did the following:
$ pip install --upgrade google-api-python-client oauth2client
Collecting google-api-python-client
Downloading https://files.pythonhosted.org/packages/4e/92/e4746e646585c8c359781c19984fe8b6b8794a6cfe382cd481329d5252ac/google-api-python-client-1.7.4.tar.gz (141kB)
(... SNIP ...)
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
So as you can see Ubuntu is still distributing 8.1.1
but now version 18.1
is available whereas a four months ago 10.0.1
was available.
I’ve read many times how people upgrading pip
and python
got burned so my advise would be to do nothing unless you run into problems and feel a forced upgrade is necessary to correct them.
I’ve learned the hard way «If it’s not broken don’t fix it».
answered Nov 7, 2018 at 2:27
WinEunuuchs2UnixWinEunuuchs2Unix
98.8k34 gold badges233 silver badges401 bronze badges
Simply, try to modify the installation command:
pip3.5 install absl-py
with
pip3.5 install --user absl-py
answered Jul 18, 2019 at 14:08