question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install autokeras fails on torch ==1.1.0

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:19
  • Comments:26

github_iconTop GitHub Comments

3reactions
phier77commented, May 21, 2019

@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

3reactions
yckoongcommented, May 21, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install pytorch with pip on Windows - Stack Overflow
I tried multiple solutions and it wasn't working on Windows 10 until I tried this: pip install torch==1.5.0+cpu -f ...
Read more >
Installation - AutoKeras
Pip : Follow the TensorFlow install steps to install Pip. Tensorflow >= 2.3.0: AutoKeras is based on TensorFlow. Please follow this tutorial to...
Read more >
could not find a version that satisfies the requirement torch==0.4.1 ...
In a fresh pipenv virtualenv (using Python 3.7 via pyenv), running pipenv install torch torchvision results in a successful install of 0.4.1 but...
Read more >
tensorflow-metal | Apple Developer Forums
So the problem is I install the python(ver 3.8.12) using miniforge3 and ... 1.4.1 autokeras : 1.0.2 keras : 2.8.0 keras-tuner : 1.1.0...
Read more >
autokeras iwildcvam - Kaggle
!pip install git+https://github.com/onnx/onnx-tensorflow.git !pip install keras2onnx !apt install -y graphviz !pip install -q keras torch torchvision ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found