I set up a virtualenv and am trying to install a package where I get the error:
error: chardet 4.0.0 is installed but chardet<4.0,>=2.0 is required by {'aiohttp'}
Thus I tried to downgrade:
$ pip3 install --upgrade chardet==3.0.0
Collecting chardet==3.0.0
Using cached chardet-3.0.0-py2.py3-none-any.whl (133 kB)
Installing collected packages: chardet
Attempting uninstall: chardet
Found existing installation: chardet 4.0.0
Uninstalling chardet-4.0.0:
Successfully uninstalled chardet-4.0.0
Successfully installed chardet-3.0.0
Still when I try to install my package I get:
error: chardet 4.0.0 is installed but chardet<4.0,>=2.0 is required by {'aiohttp'}
I also tried to first uninstall the existing version:
pip3 uninstall chardet
But I still receive the error:
error: chardet 4.0.0 is installed but chardet<4.0,>=2.0 is required by {'aiohttp'}
Executing these steps I would expect chardet to downgrade to version 3.0.0 and my package to install. Is there a different way to do this without touching my packages outside of the venv?
Pipdeptree output:
$ pipdeptree
pipdeptree==2.0.0
- pip [required: >=6.0.0, installed: 21.0.1]
pkg-resources==0.0.0
setuptools==53.0.0
wheel==0.36.2
Edit:
downgrading indeed worked as expected. I got the error because the package I tried to install required sudo rights and thus by executing it as sudo I left the virtual environment. Downgrading the package globally let me install the package although I wanted to avoid this.
Try using pipdeptree, it displays installed packages as a dependency tree, there you can find a bug in chardet with different versions specified.
Related
I try to install Tensorflow using this line in PowerShell (as admin):
pip install tensorflow
But received this ERROR:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
astroid 2.3.2 requires six==1.12, but you have six 1.15.0 which is incompatible.
astroid 2.3.2 requires wrapt==1.11.*, but you have wrapt 1.12.1 which is incompatible.
Also, I tried to uninstall six and wrapt using: pip uninstall six wrapt and run pip install tensorflow again but still got the same error as above.
Thank you in advance!
I was opening Anaconda Navigator so I closed it and reopened PowerShell again, ran the install command and it went smoothly without further error.
I'm experiencing a issue with my packages, I installed a package with Python 3.7 and the current version of Python in my computer is 3.9. So I can't uninstall or update the given package.
ζ pip3 install --upgrade youtube-dl
Requirement already satisfied: youtube-dl in /usr/local/lib/python3.9/site-packages (2021.4.7)
Collecting youtube-dl
Downloading youtube_dl-2021.4.26-py2.py3-none-any.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 551 kB/s
Installing collected packages: youtube-dl
Attempting uninstall: youtube-dl
Found existing installation: youtube-dl 2021.4.7
Uninstalling youtube-dl-2021.4.7:
Successfully uninstalled youtube-dl-2021.4.7
Successfully installed youtube-dl-2021.4.26
WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the '/usr/local/opt/python#3.9/bin/python3.9 -m pip install --upgrade pip' command.
ζ youtube-dl --version
2021.04.01
ζ which pip3
/usr/local/opt/python#3.9/bin/pip3
ζ which youtube-dl
/Library/Frameworks/Python.framework/Versions/3.7/bin/youtube-dl
How can
What you need to do to solve this issue is navigate to the Pip from the version that you have installed the package, in this case, 3.7, uninstall or update the package using this pip.
ζ cd /Library/Frameworks/Python.framework/Versions/3.7/bin/
ζ ./pip3 uninstall youtube-dl
Found existing installation: youtube-dl 2021.4.1
Uninstalling youtube-dl-2021.4.1:
Would remove:
/Library/Frameworks/Python.framework/Versions/3.7/bin/youtube-dl
/Library/Frameworks/Python.framework/Versions/3.7/etc/bash_completion.d/youtube-dl.bash-completion
/Library/Frameworks/Python.framework/Versions/3.7/etc/fish/completions/youtube-dl.fish
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/youtube_dl-2021.4.1.dist-info/*
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/youtube_dl/*
/Library/Frameworks/Python.framework/Versions/3.7/share/doc/youtube_dl/README.txt
/Library/Frameworks/Python.framework/Versions/3.7/share/man/man1/youtube-dl.1
Proceed (y/n)? y
Successfully uninstalled youtube-dl-2021.4.1
Now you can install the package with latest the Python in your system
ζ pip3 install youtube-dl
This answer also provide a method for dealing with multiple python versions
well and if you are looking to install the latest pip version with the help of pip, just runpython3 -m pip install pip=="VERSION_NUMBER_HERE" for a precise pip installation
I have the following issue every time I try to install a package in Python 3:
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command
I tried to do the upgrade pip command as follows, with the also following warning:
$ pip3 install --upgrade pip
Collecting pip
Using cached pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-20.3.1
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command
I tried the other way, with the same error:
$ /usr/bin/python3 -m pip install --upgrade pip
Collecting pip
Using cached pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-20.3.1
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command
I also tried the Following suggestion to solve this problem, downloading the package and ask pip to install directly from the .tar.gz file:
$sudo python3 -m pip install /home/me/Downloads/pip-20.3.1.tar.gz
[sudo] password for me:
Processing /home/me/Downloads/pip-20.3.1.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: pip
Building wheel for pip (PEP 517) ... done
Created wheel for pip: filename=pip-20.3.1-py2.py3-none-any.whl size=1518515 sha256=36207044a2b9042728f3cd0f971569217f4e2e9c68c84adbf5c42617e08b9d3c
Stored in directory: /root/.cache/pip/wheels/0e/09/b2/4673e6d2eee911dbbeaeeba8e68eebb9719b1b3ba25ad93e2c
Successfully built pip
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.3.1
Again, the same error happens:
$pip3 install pydot
Collecting pydot
Using cached pydot-1.4.1-py2.py3-none-any.whl (19 kB)
Collecting pyparsing>=2.1.4
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: pyparsing, pydot
Successfully installed pydot-1.4.1 pyparsing-2.4.7
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
My Python versions are:
$python --version
Python 3.7.9
$python3 --version
Python 3.8.5
My PATH variable links the following directories:
$echo $PATH
/home/me/.local/bin:/home/me/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
What is happening here? should I have to add something to my PATH variable in order to link the right python version to the pip upgrade command? or there is something else to be done?
Just do the pip3 upgrade with sudo. I think you mixed up python2 and python3 installs with your sudo call.
Just tested and gave me the correct version on pip3:
$ sudo pip3 install --upgrade pip
Collecting pip
Downloading pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 2.6 MB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.3.1
$ pip3 --version
pip 20.3.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
Tested on KDE Neon (Ubuntu 20.04).
Also make sure you don't have another version of pip installed somewhere in the user installations. These easily get mixed up between apt and the user locations for python installs.
pip install --upgrade pip --no-cache-dir
This worked for me
You are using pip version 19.2.3, however version 20.3.4 is available.
You should consider upgrading via the pip install --upgrade pip command.
I am trying to install flair. It is throwing below error when executing below command:
pip install flair
ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
tiny-tokenizer depends on SudachiDict_core# https://object-storage.tyo2.conoha.io/v1/nc_2520839e1f9641b08211a5c85243124a/sudachi/SudachiDict_core-20190927.tar.gz
I thought installing this package explicitly might fix the error but it doesn't. The error remains same.
The installed version of SudachiDict-core is below:
SudachiDict-core 0.0.0
Below is the Environment:
OS: Windows 10
Python: 3.6 (64 bit)
Any hint is appreciated. Thank you!
Note:
First hurdle when installing flair was torch package. It was resolved simply when torch package is installed. The error looked like below:
ERROR: Could not find a version that satisfies the requirement torch>=1.1.0 (from flair) (from verERROR: No matching distribution found for torch>=1.1.0 (from flair)
You can try
pip install --upgrade git+https://github.com/zalandoresearch/flair.git
Source: https://github.com/flairNLP/flair/issues/1327#issuecomment-571639994
Or
to install separately:
pip install tiny-tokenizer
After this run:
pip install flair
It is strange running below command solved the problem.
pip install flair==0.4.3
I assume that the problem is in a latest version 0.4.4 (and its dependencies).
Note: I had torch==1.1.0 package already installed.
I was following Apache's instructions to install MxNet for Python on a MacOS (CPU): http://mxnet.incubator.apache.org/install/index.html
However, when I get to the line
pip install mxnet --pre
I run into the issue where it quits installing due to the following error:
awsebcli 3.12.4 has requirement requests<=2.9.1,>=2.6.1, but you'll have requests 2.18.4 which is incompatible.
If someone could help me figure out what's going on, that would be really helpful. I'm running this on a Macbook Pro with High Sierra and Python 3.6.5 on it as well as EB CLI 3.12.4
EDIT: I tried using (as suggested):
pip install requests==2.9.1
However, it results in
awsebcli 3.12.4 has requirement requests<=2.9.1,>=2.6.1, but you'll have requests 2.18.4 which is incompatible.
Installing collected packages: requests
Found existing installation: requests 2.9.1
Uninstalling requests-2.9.1:
Successfully uninstalled requests-2.9.1
Successfully installed requests-2.18.4
This prevents me from finishing my installation of MxNet and I'm unsure how to proceed.
Looks like you have a higher version of requests than needed for awsebcli. Try installing the lower version if that works for you:
pip install requests==2.9.1