Error installing MxNet for python with pip due to awsebcli - python

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

Related

Imcompatible packages when installing Tensorflow using pip

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.

downgrading pip package in virtualenv

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.

Error in installing python package Flair, about a dependent package not hosted in PyPI

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.

Pip can not find tensorflow for python 3.6 on macOS

I am installing tensorflow on a new virtualenvironment. When I try to pip install tensorflow I get the following message
Collecting tensorflow-gpu
Could not find a version that satisfies the requirement tensorflow-gpu (from
versions: )
No matching distribution found for tensorflow-gpu
I am using macOS yosemitie and python 3.6
I've tried the following:
Installing with python 3.5
Going to pypi, downloading the wheel and using pip on that
In addition, also trying to use the --use wheel option with pip
git cloning the tensorflow repo and installing with tensorflow/tools/pip_package/setup.py
So far nothing has worked. Any insight as to why and what I could do?
Note: As of version 1.2, TensorFlow no longer provides GPU support on macOS.
run the following without -gpu:
pip install --upgrade tensorflow # for Python 2.7
pip3 install --upgrade tensorflow # for Python 3.n
official instructions can be found here: Installing TensorFlow on macOS

from PIL import Image failed on Python3.6

I'm new to Python and I have a problem with Pillow (as many people before me).
Running the command below:
from PIL import Image
causes a known error:
ModuleNotFoundError: No module named 'PIL'
The problem occurs when I try to run it with Python 3.6, everything works fine with Python 3 however I have to use version 3.6 in my project.
Pillow version: 4.3.0, so it is compatible with this Python version.
Why does this not work on the newer version?
I had to install pillow for 3.6 python: python3.6 -m pip install pillow
PIL and Python compatibility issue. See for example (http://pillow.readthedocs.io/en/5.1.x/installation.html ).
pipX search Pillow -> shows which version is installed and available.
Better to use Python virtual environment to avoid compatibility issues.
pip uninstall Pillow
pip uninstall PIL
pip install Pillow
Source
C:\python>pip install pillow
Collecting pillow
Downloading https://files.pythonhosted.org/packages/4e/d9/468422371e6fcf02d6a162ee30db4552221de8b2b3ff837363bf54cbb347/Pillow-6.1.0-cp36-cp36m-win_amd64.whl (2.0MB)
100% |████████████████████████████████| 2.0MB 3.2MB/s
Installing collected packages: pillow
Successfully installed pillow-6.1.0
You are using pip version 18.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Categories

Resources