Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix pip hanging on uninstalling sqlalchjemy

In Python 2.7.11 under Windows I have installed sqlalchemy into a virtual environment. Now, when I try to uninstall it via

pip uninstall sqlalchemy

pip hangs when listing the following lines:

.
.
.
c:\venv\lib\site-packages\sqlalchemy\util\langhelpers.py
c:\venv\lib\site-packages\sqlalchemy\util\langhelpers.pyc
c:\venv\lib\site-packages\sqlalchemy\util\queue.py
c:\venv\lib\site-packages\sqlalchemy\util\queue.pyc
c:\venv\lib\site-packages\sqlalchemy\util\topological.py
c:\venv\lib\site-packages\sqlalchemy\util\topological.pyc

This happens repeatedly, when I cancel the uninstall command and issue it again, even after system restart.

What can I do to make pip continue?

like image 725
halloleo Avatar asked Aug 09 '16 04:08

halloleo


People also ask

Why can't I install using pip?

One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.

How do I clear my pip cache?

If you want to force pip to clear out its download cache and use the specific version you can do by using --no-cache-dir command. If you are using an older version of pip than upgrade it with pip install -U pip. This will help you clear pip cache.

What happens when you do pip install?

The pip install <package> command always looks for the latest version of the package and installs it. It also searches for dependencies listed in the package metadata and installs them to ensure that the package has all the requirements that it needs.

Does pip install install dependencies?

Pip is able to install packages configured with their dependencies, because most authors package their code as wheels by default before submitting to PyPI.


2 Answers

If you don't want to type "y" (or you want to run it in a script), use

pip uninstall sqlalchemy --yes

like image 70
David Espart Avatar answered Oct 08 '22 18:10

David Espart


Looks like pip uninstall prompts you with "Do you want to continue (Y/N)?", but that is not visible in cygwin or git bash for some reason.

Typing "y" and pressing enter makes the pip uninstall proceed.

like image 21
johan.blumenberg Avatar answered Oct 08 '22 19:10

johan.blumenberg