pip install -U setuptools fail windows 10
Asked Answered
I

4

25

I just installed Python3.7 and Pycharm on my Windows 10 PC. I am running pip version 9.0.2

In Pycharm, it says I have version 28.8.0 of setuptools, when I try to upgrade this in Pycharm, which I believe runs the line

pip install -U setuptools

I get the error:

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\users\Username\pycharmprojects\untitled1\venv\lib\site- packages\setuptools-28.8.0-py3.6.egg' -> 'C:\Users\Username\AppData\Local\Temp\pip-i5jxitem- uninstall\users\Username\pycharmprojects\untitled1\venv\lib\site- packages\setuptools-28.8.0-py3.6.egg'

I have tried running

pip install --upgrade setuptools

which runs successfully and says I have the latest version.

Does anyone know how I can successfully update setuptools?

The reason I'd like setuptools to be up to date, is so I can then get rid of the egg_info error installing other packages.

Intemperate answered 17/3, 2018 at 15:38 Comment(0)
W
50

I have the same error. Not sure why it happened. But I managed to upgrade by running: pip install setuptools --upgrade --ignore-installed

Wolsky answered 25/3, 2018 at 18:43 Comment(2)
To clarify: open a terminal, and run the above command. If you omit the '--ignore-installed', you will get the same error that PyCharm emits.Joby
Solved it for me when trying to upgrade setuptools from 40.8.0 to 45.0.0Skydive
C
4

You can also try:

easy_install --upgrade setuptools 

Even though easy_install's deprecated, there's a good chance it'll still work on Windows.

If you try to use pip to upgrade setuptools:

pip install -U setuptools

it seems to get stuck on an error about 10.0 vs 18.0 "You should consider upgrading via the 'python -m pip install --upgrade pip' command."

The official pip doco(https://pip.pypa.io/en/stable/installing/#upgrading-pip) says on Windows to use this:

python -m pip install --upgrade pip

However, it seemed pip and setuptools had a hiccup with a circular dependency or lock around pip-v9.0 or 10.0 to pip-18.0 and setuptools v28.0 to v39.0 or 40.0 so persevere with this:

python -m pip install --force-reinstall pip

You need setuptools >= 39.0 if you want to install pipenv also.

Cherrylchersonese answered 5/3, 2019 at 7:30 Comment(0)
B
0

Try the following command to upgrade the setup tools in windows

pip install -U pip setuptools

or

pip install setuptools --upgrade --ignore-installed
Brocatel answered 9/11, 2021 at 4:46 Comment(0)
M
0

I solved more or less similar problem as follow:

In my PyCharm project terminal tab:

`(venv) PS C:/path/to/project>`

updated pip, setup tools and wheels with command:

py -m pip install --upgrade pip setuptools wheel

(source of recommendation)

Minorite answered 3/1, 2023 at 7:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.