Unable to install 'pyreadline' using pip on Windows - python

I am trying to uninstall 'pyreadline' python package from my windows system using
pip uninstall pyreadline-1.7.1-py2.py3-none-any.whl
but it gives an error:
Cannot uninstall 'pyreadline'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.

First:
pip install --upgrade --force-reinstall
Now try:
pip uninstall pyreadline

pip install --upgrade --force-reinstall pip==9.0.3
pip uninstall pyreadline
pip install --upgrade pip
or
remove pyreadline package from lib (path\lib\site-packages\pyreadline )

Related

How to prevent pip install the latest version package if the package has installed [duplicate]

Is there any way to force install a pip python package ignoring all it's dependencies that cannot be satisfied?
(I don't care how "wrong" it is to do so, I just need to do it, any logic and reasoning aside...)
pip has a --no-dependencies switch. You should use that.
For more information, run pip install -h, where you'll see this line:
--no-deps, --no-dependencies
Ignore package dependencies
Try the following:
pip install --no-deps <LIB_NAME>
or
pip install --no-dependencies <LIB_NAME>
or
pip install --no-deps -r requirements.txt
or
pip install --no-dependencies -r requirements.txt
When I was trying install librosa package with pip (pip install librosa), this error appeared:
ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I tried to remove llvmlite, but pip uninstall could not remove it. So, I used capability of ignore of pip by this code:
pip install librosa --ignore-installed llvmlite
Indeed, you can use this rule for ignoring a package you don't want to consider:
pip install {package you want to install} --ignore-installed {installed package you don't want to consider}

pip3 installed without pip

I have pip3 installed from when I installed Python3 through Homebrew. But now when I use pip3 to install things, I get the following message:
You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
But when I use pip install --upgrade pip, I get the following message:
-bash: pip: command not found
I'm not sure what the precise terminology is, but should I be "linking" the pip command to pip3?
Upgrade pip3 as follows to avoid the confusion between pip and pip3:
python3 -m pip install --upgrade pip

Installing opencv on Ubuntu 16-04

I have a virtualenv created with virtualenvwrapper.
However, I'm on python 2.7
Whenever I try to install the opencv-python by pip, as sudo or not, I receive this message:
pip install opencv-python
Downloading/unpacking opencv-python
Could not find any downloads that satisfy the requirement opencv-python
Cleaning up...
No distributions at all found for opencv-python
Storing debug log for failure in /home/kristian/.pip/pip.log
Any ideas on why this us happening?
Your pip is most likely too old since opencv-python packages are distributed as manylinux1 wheels (https://github.com/pypa/manylinux). You need pip version 8.1 or later to install manylinux1 binary packages.
To upgrade your pip globally:
sudo -H pip install --upgrade pip
Inside virtualenv this should be enough:
pip install --upgrade pip
I recommend you to use anaconda, which is very convenient and saves a lot of trouble. With anaconda, you don't need to care about your local environment.

pip is a package and cannot be directly executed

Im trying to install google assistant on my Raspberry Pi, but when I keep getting an error: pip is a package and cannot be directly executed
Instead of
pip [...]
Try doing
python -m pip [...]
Can't really help more without more info.
I think your version of pip is old. You need to upgrade it first, like this:
pip install -U pip
You may need to upgrade setuptools too:
pip install -U setuptools
Since google-assistant-library is available as a wheel, you need to install wheel too:
pip install wheel
I don't know if you can do that with Raspberry Pi, but I recommend you to used a virtualenv. That way, you have a fresh and isolated Python executable and a recent version of pip.
virtualenv your_proj
source your_proj/bin/activate
pip install wheel
pip install google-assistant-library
For newer version ie. using pip3:
pip3 install -U <<package name>>
I had the same problem.
I think it was an outcome of a failed
> .\python.exe -m pip install --upgrade pip
do to some environment misconfiguration.
So it first removed the existing version 10.0.1, and then the installation of the new version 22.3.1 failed, leaving me with no pip.
From official documentation, I ran
> .\python.exe -m ensurepip --upgrade
which restored the original pip 10.0.1.
Then I fixed the environment problem, and then again
> .\python.exe -m pip install --upgrade pip
I now have pip 22.3.1.

How to uninstall packages installed using setuptools

That's it, I've some package installed using setuptools i.e. I ran the command python setup.py install from the package source.
My question is, how do I uninstall the package or upgrade it?
Install pip using easy_install:
easy_install pip
and then:
pip uninstall <package>
PS. Probably duplicate.

Categories

Resources