Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on install - Windows 10 #149

Closed
bitsam opened this issue Dec 13, 2016 · 9 comments
Closed

Error on install - Windows 10 #149

bitsam opened this issue Dec 13, 2016 · 9 comments

Comments

@bitsam
Copy link

bitsam commented Dec 13, 2016

I have progressed through the install. although I got stuck with not having visual C++ 14 installed. I now get the following error at the end of the install. can you please help. What more info do you need.

Command "c:\users\username\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\username\AppData\Local\Temp\pip-build-j_5l4z6_\scipy\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\username\AppData\Local\Temp\pip-5r95bpz0-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\username\AppData\Local\Temp\pip-build-j_5l4z6_\scipy\

@bitsam
Copy link
Author

bitsam commented Dec 13, 2016

Fixed it myself.

pip does not work well for Windows because the standard pip package index site, PyPI, does not yet have Windows wheels for some packages, such as SciPy

https://www.scipy.org/install.html

Download the pre-built scipy package from the instructions on the link above.

@bitsam bitsam closed this as completed Dec 13, 2016
@ClimbsRocks
Copy link
Owner

ahhh, that's super useful to know- thanks for both the fix, and letting me know, @bitsam ! If you have any other useful things to know about install on Windows machines, I'd love to open an issue that holds best practices for installing on Windows.

@bitsam bitsam reopened this Dec 15, 2016
@bitsam
Copy link
Author

bitsam commented Dec 15, 2016

I tried running the default script you have put up and get the error below.

================ RESTART: C:/Python35-32/Scripts/auto_ml_1.py ================
Traceback (most recent call last):
File "C:/Python35-32/Scripts/auto_ml_1.py", line 3, in
from sklearn.datasets import load_boston
File "C:\Python35-32\lib\site-packages\sklearn_init
.py", line 57, in
from .base import clone
File "C:\Python35-32\lib\site-packages\sklearn\base.py", line 12, in
from .utils.fixes import signature
File "C:\Python35-32\lib\site-packages\sklearn\utils_init_.py", line 11, in
from .validation import (as_float_array,
File "C:\Python35-32\lib\site-packages\sklearn\utils\validation.py", line 18, in
from ..utils.fixes import signature
File "C:\Python35-32\lib\site-packages\sklearn\utils\fixes.py", line 406, in
if np_version < (1, 12, 0):
TypeError: unorderable types: str() < int()

_

I was also getting silimar issues with SKLEARN modules when trying other project scripts. For example:

from sklearn import cross_validation

gives me the same errors. Could it be the Windows version of scikit_learn / sklearn is missing modules, or the command to launch these modules is different.

I apologize in advance, i am a newbie to python, and I am running Window10 :(

I was advised to install Anaconda to manage python packages on Windows. So all packages are up to date according to Anaconda.

@ClimbsRocks
Copy link
Owner

I have a feeling it's related to: http://stackoverflow.com/questions/40693558/typeerror-unorderable-types-str-int

It's almost certainly a module install issue with either sklearn, or a sklearn dependency.

try installing a specific version of numpy that is only numbers (no characters in the version name).

I'd also recommend opening an issue with the sklearn team about this.

Let me know how that goes!

@bitsam
Copy link
Author

bitsam commented Dec 16, 2016

Thank you @ClimbsRocks Your Default script now works :) . Your response confirmed my suspicions and pointed me in the right direction to fix this. The stack overflow post is a related issue, However when I went to Numpy.org to get a different version numpy-1.11.2, I still experienced issues. The final issue was missing the MKL module.

"_from numpy.distributor_init import NUMPY_MKL # requires numpy+mkl"

So I then found a post advising to find a pre-packaged version of numpy+MKL

http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

As mentioned earlier, this seems to be a Windows OS issue with the scipy packages.

@ClimbsRocks , I sent you an email, can you help me with interpreting my data-set ?

Thanks for your help and patience

@ClimbsRocks
Copy link
Owner

Glad the issue was fixed! Thanks again for filing an issue and being involved. Let me know if you have any other feedback in a new issue!

@Amarchuk
Copy link

I am faced near the same issue and want to add one suggestion and one workaround in this comment.

I am on Windows 7 x64, Python 2.7 and when I try to install your project (in which I interested a lot!) via pip I get next error:

Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

So I google it and go at StackOverflow topic, where people say that

TensorFlow supports only 64-bit Python 3.5 on Windows.

So my suggestion is to write somewhere in README that at least part of auto_ml works only for Python3 and x64 Windows.

But I also find a workaround here - after doing

pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow‌​-1.0.1-py2-none-any.‌​whl

(even that its obviously for mac) I be able to install auto_ml with pip, run your example code (it will be also good to add result somewhere so I can compare with my own) and run tests, where I get 33 errors from 87 total. So its obviously not a solution, but at least it works. Thanks.

@ClimbsRocks
Copy link
Owner

Oh bummer- I'd always seen that they had Windows install instructions, and all the blog posts mentioned Windows was supported. I didn't realize that only meant a subset of Windows.

Thanks for filing the issue, and sharing all the information! I'll definitely make note of this in the README.

33 errors might be only from tests that are actually using tensorflow, so the rest of the package might run properly for you, assuming you're not using feature_learning or deep learning models.

Actually, if Keras is installed, you can probably still run all the feature_learning and deep learning stuff, I might just have to make a few changes under the hood.

Two obvious workarounds:

  1. Use virtualenv to create virtual environments, where you can specify which python version to use. See this thread: https://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv
  2. Docker! I built a docker image that I use to run the tests on, so it's verified to work. I've also taken inspiration from kaggle's kpython idea to create my own CLI alias for this, that I've put in my ~/.bash_profile. I'll update the issue with that alias later. But, all I do now to run auto_ml things is apython python_script_name.py, and it runs on Docker, so I don't need to worry about whatever is or is not installed on my local machine. I'll probably add a section on this to the docs.

Thanks again for all the info, and for adding to this issue! Please let me know if you have any other questions.

@Amarchuk
Copy link

Amarchuk commented Jun 30, 2017

Thanks @ClimbsRocks for your answer. Yes, using both virtualenv and docker images is obviously better solution, but they need little knowledge how to use them (which is definitely worth to achive), so thanks again for point out a link to container. I will inform you if there will be any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants