Error when install autokeras on Windows 10 - installation

I tried to install autokeras (pip install autokeras) on my windows10 computer but got the following errors:
tensorflow-gpu 1.9.0 has requirement tensorboard<1.10.0,>=1.9.0, but you'll have tensorboard 1.10.0 which is incompatible.
tensorflow 1.10.0 has requirement numpy<=1.14.5,>=1.13.3, but you'll have numpy 1.15.4 which is incompatible.
Installing collected packages: scikit-learn, unidecode, pandas, inflect, tqdm, imageio, tensorboard, tensorflow, opencv-python, lightgbm, nltk, lws, joblib, librosa, networkx, cloudpickle, toolz, dask, PyWavelets, scikit-image, chardet, idna, urllib3, requests, autokeras
Found existing installation: scikit-learn 0.18.1
Cannot uninstall 'scikit-learn'. 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.
My python is 3.6.5, numpy 1.12.0 & 1.15.4, tensorboard 1.9.0, tensorflow-gpu 1.9.0.
Is the gpu version of tensorflow a problem for autokeras?
I would appreciate it a lot if someone can help me to solver this problem.

I had a similar problem when installing tensorflow-gpu on linux. Your tensorboard and numpy are too recent, meaning they are incompatible.
Your best bet is to set up a virtual environment (use virtualenv), install tensorboard 1.9.0 and numpy 1.13.3 and specify those for the virtual environment. Run the virtual environment and install tf-gpu in there and it should work.

Related

Incompatible version requirements when install package through pip

I have a conda environment. I want to install DeepSpeech in it. When I install it through pip I get an error, but the deepspeech package still gets installed.
ERROR: tensorflow 2.1.0 has requirement scipy==1.4.1; python_version >= "3", but you'll have scipy 1.5.0 which is incompatible.
ERROR: tensorflow 2.1.0 has requirement tensorboard<2.2.0,>=2.1.0, but you'll have tensorboard 2.2.1 which is incompatible.
What does this mean? I know I had tensorflow installed before, does this mean it got reinstalled, but it still has previous dependencies or were other libraries changed and the previous tensorflow is now incompatible.
The output of pip3 check
tensorflow 2.1.0 has requirement scipy==1.4.1; python_version >= "3", but you have scipy 1.5.0.
tensorflow 2.1.0 has requirement tensorboard<2.2.0,>=2.1.0, but you have tensorboard 2.2.1.
pathos 0.2.7 has requirement dill>=0.3.3, but you have dill 0.2.9.
multiprocess 0.70.11.1 has requirement dill>=0.3.3, but you have dill 0.2.9.
Try it:
pip uninstall scipy
pip uninstall tensorboard
pip install --ignore-installed tensorflow==2.1.0

PyTorch dll issues for Caffe2

I am using a Windows 10 Machine and after re-installing Anaconda and all of the packages I had previously, including torchvision, torch and necessary dependencies, I am still getting this error:
OSError: [WinError 127] The specified procedure could not be found. Error loading "C:\Users\XXX\Anaconda3\envs\XXX\lib\site-packages\torch\lib\caffe2.dll" or one of its dependencies.
I am using python 3.7.9 and:
torchaudio=0.6.0=py37
torchvision=0.7.0=py37_cpu
tornado=6.0.4=py37he774522_1
traitlets=5.0.5=py_0
I've looked into it quite a bit but feel like this should be an easy solve...
I do not have CUDA and have used this:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
as per instructed on the official website of pytorch
After a long time trying many things with Anaconda I decided to use bare python instead and I installed Python 3.8.6 and installed PyTorch from the link you provided and it finally worked even with CUDA support. Make sure to completely remove all Anaconda/Other Python version scripts from your path to ensure only the 3.8.6 version is used by your prompt.
I had the same problem, so I uninstalled the pytorch in my machine using
"conda uninstall pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch"
Then did a clean installation using the following
"pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html"
I did not use conda for installation as it was persistently giving me the cpu version of pytorch.
I tried to install PyTorch with Anaconda and had the same error.
For me what solved the issue was to uninstall Pytorch using Pip (even though I installed it with conda) and then installing again with Pip as explains at PyTorch guide.
Uninstall:
pip uninstall torch
pip uninstall torchvision
pip uninstall torchaudio
Install:
pip3 install torch torchvision torchaudio

Unable to install tensorflow==2.0.0beta1: wrapt conflict

I want to install tensorflow2.0.0 but I can't even install tensroflow1.14.0.
I am using macbook pro. I kept running into problems that some packets version are not compatible. I then tried to uninstall certain packets then reinstall them but it didn't work.
Error message:
ERROR: thinc 6.12.1 has requirement msgpack<0.6.0,>=0.5.6, but you'll have msgpack 0.6.1 which is incompatible.
ERROR: thinc 6.12.1 has requirement wrapt<1.11.0,>=1.10.0, but you'll have wrapt 1.11.2 which is incompatible.
Installing collected packages: wrapt, tensorflow
Found existing installation: wrapt 1.10.10
ERROR: Cannot uninstall 'wrapt'. 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.
Execute the below command:
pip install wrapt==1.10.0 --ignore-installed

How to install AutoKeras on aws-ec2

I tried to install autokeras on aws ec2 (p2.xlarge) with the environment python 3.6 & tensorflow. I get following error after "pip install autokeras":
tensorflow 1.10.0 has requirement numpy<=1.14.5,>=1.13.3, but you'll have numpy 1.15.4 which is incompatible.
Installing collected packages: imageio, autokeras
Found existing installation: imageio 2.3.0
Cannot uninstall 'imageio'. 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 uninstalled numpy 1.15.4 and installed numpy 1.14.5. With "conda list", I can see the numpy has the correct version.
But after "pip install autokeras" I get the same error and numpy 1.15.4 is still there.
Has anyone successfully installed autokeras on aws ec2? What shall I do to install autokeras correctly?
(Maybe the 'imageio' is the next problem?)
Thank you!
I think you need tensorflow 1.14. Here my notes for AutoKeras installation:
Autokeras Installation Notes in the Deep Learning AMI:
We launched a new deep learning AMI with ubuntu.
The deep learning AMI didn't worked using the "tensorflow + keras + py3.6" environment (so no need for a DL AMI probably, you can save space on disk using a normal clean AMI), so we managed o install autokeras doing the following:
Create a new environment with Anaconda: $ conda create -n autokeras python=3.6.
1.1. Remember that only python 3.6 is working with autokeras
Activate virtual env: It didn't work $ conda activate autokeras, but it works using $ source activate autokeras.
installation of all the packages as required by pyimagesearch.
3.1. A new problem arised here, which, long story short, was solved using the next post (note that I chenged the order, since urllib3 needs jsonschema to be installed first):
$ pip uninstall urllib3```
$ pip uninstall jsonschema
$ pip install jsonschema==2.6.0
$ pip install urllib3==1.24.1
3.2. Finally I was able to install all 3 packages:
$ pip install tensorflow # or tensorflow-gpu
$ pip install keras
$ pip install autokeras
3.3. Autokeras worked fine at this point, but it raised a warning:
>>> import autokeras
Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex
So I just went to the webpage and followed the installation steps. Now it works without warnings (so far):
$ git clone https://github.com/NVIDIA/apex
$ cd apex
$ pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Installing tensorflow on anaconda/mac?

I can not find a solution to install tensorflow on anaconda/mac.
When i try: conda install tensorflow,
I get:
UnsatisfiableError: The following specifications were found to be in conflict:
- blaze -> numba -> numpy=1.13
- tensorflow
Use "conda info " to see the dependencies for each package.
I tried reinstalling numpy, and could not find any relevant documentation.
On mac use following command:
conda install -c conda-forge tensorflow
This will install the latest Tensorflow on your system. if you wish to upgrade it to newer version then you can use the following command
conda update -f -c conda-forge tensorflow
I have had success installing tensorflow through pip...
pip install tensorflow
or, if you have all of the proper libraries...
pip install tensorflow-gpu
But if you have already removed numpy form the anaconda install, you might be in for a long day because almost all of the numeric packages require it. If the above pip install doesn't work, you might want to start from a clean anaconda install.
I have installed tensorflow using -
pip install tensorflow
Or, you can use Anaconda in following way -
Open Anaconda Navigator
On Left side go to Environments
Create a new environment (eg :- tensorflow_tf), select python 3.7
then select Not installed and Search "tensorflow"
click on tensorflow and apply

Resources