autokeras: pip install autokeras fails on torch ==1.1.0

Bug Description

When executing pip install autokeras, I get the following message: Could not find a version that satisfies the requirement torch==1.0.1.post2 (from autokeras) (from versions: 0.1.2, 0.1.2.post1) No matching distribution found for torch==1.0.1.post2 (from autokeras)

Reproducing Steps

Steps to reproduce the behavior:

  • Step 1: set up anaconda environment
  • Step 2: install pytorch via their website’s recommended command: conda install pytorch-cpu torchvision-cpu -c pytorch
  • Step 3: try to install autokeras via pip install autokeras
  • Step 4: get the following output:
Collecting autokeras
  Downloading https://files.pythonhosted.org/packages/c2/32/de74bf6afd09925980340355a05aa6a19e7378ed91dac09e76a487bd136d/autokeras-0.4.0.tar.gz (67kB)
    100% |████████████████████████████████| 71kB 1.3MB/s
Collecting scipy==1.2.0 (from autokeras)
  Downloading https://files.pythonhosted.org/packages/c4/0f/2bdeab43db2b4a75863863bf7eddda8920b031b0a70494fd2665c73c9aec/scipy-1.2.0-cp36-cp36m-win_amd64.whl (31.9MB)
    100% |████████████████████████████████| 31.9MB 508kB/s
Requirement already satisfied: tensorflow==1.13.1 in c:\[...]\lib\site-packages (from autokeras) (1.13.1)
Collecting torch==1.0.1.post2 (from autokeras)
  Could not find a version that satisfies the requirement torch==1.0.1.post2 (from autokeras) (from versions: 0.1.2, 0.1.2.post1)
No matching distribution found for torch==1.0.1.post2 (from autokeras)

Expected Behavior

Autokeras is installed without error.

Setup Details

Include the details about the versions of:

  • OS type and version: Windows 10 Version 10.0.17763 Build 17763
  • Python: 3.6.8 (anaconda)
  • autokeras: 0.4.0
  • scikit-learn: 0.20.3
  • numpy:1.16.2
  • keras: 2.2.4
  • scipy:1.2.1
  • tensorflow:1.13.1
  • pytorch:1.1.0

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 18
  • Comments: 26

Most upvoted comments

@JasonMDSII met the same problem with you. It showed "No module named autokeras"when I tried to import autokeras in Jupyter Notebook. Then I download the file named autokeras-master from github and I put the autokeras file under the file named “site-packages” under created environment “autokeras” . Finally,it works.Before traning models, I suggesst you use pip to install nvidia apex to speed up because autokeras 0.4 uses pytorch to train models rather than tensorflow. 无标题

You can switch to autokeras0.3.7 & pytorch1.0.1

I tried this but using the pip installer it still won’t go through with the error. “ERROR: Could not find a version that satisfies the requirement torch==1.0.1” it seems the issue is it is trying to pip install torch by name which does not seem to work. I also tried installing torch 1.0.1 and then trying autokeras, but still nothing

Have you tried conda install pytorch torchvision cudatoolkit=8 or 9 or 10.0 -c pytorch

I solved the issue by changing the setup.py file which I have attached below. Hope this helps.

from distutils.core import setup from setuptools import find_packages

setup( name=‘autokeras’, packages=find_packages(exclude=(‘tests’,)), install_requires=[‘scipy==1.2.0’, ‘tensorflow==1.13.1’, ‘torch==1.1.0’, ‘torchvision==0.2.2.post3’, ‘numpy==1.16.1’, ‘scikit-learn==0.20.2’, ‘scikit-image==0.14.2’, ‘tqdm==4.31.0’, ‘imageio==2.5.0’, ‘requests==2.21.0’ ], version=‘0.4.0’, description=‘AutoML for deep learning’, author=‘DATA Lab at Texas A&M University’, author_email=‘jhfjhfj1@gmail.com’, url=‘http://autokeras.com’, download_url=‘https://github.com/keras-team/autokeras/archive/0.3.7.tar.gz’, keywords=[‘AutoML’, ‘keras’], classifiers=[] )

Successfully install using setup.py on terminal image

but prompt error when import autokeras, any idea? image

I solved the issue by changing the setup.py file which I have attached below. Hope this helps.

from distutils.core import setup from setuptools import find_packages

setup( name=‘autokeras’, packages=find_packages(exclude=(‘tests’,)), install_requires=[‘scipy==1.2.0’, ‘tensorflow==1.13.1’, ‘torch==1.1.0’, ‘torchvision==0.2.2.post3’, ‘numpy==1.16.1’, ‘scikit-learn==0.20.2’, ‘scikit-image==0.14.2’, ‘tqdm==4.31.0’, ‘imageio==2.5.0’, ‘requests==2.21.0’ ], version=‘0.4.0’, description=‘AutoML for deep learning’, author=‘DATA Lab at Texas A&M University’, author_email=‘jhfjhfj1@gmail.com’, url=‘http://autokeras.com’, download_url=‘https://github.com/keras-team/autokeras/archive/0.3.7.tar.gz’, keywords=[‘AutoML’, ‘keras’], classifiers=[] )