microsoft / Windows-Machine-Learning

Samples and Tools for Windows ML.
https://docs.microsoft.com/en-us/windows/ai/
MIT License
1.03k stars 446 forks source link

WinML Dashboard - Convert option not available and required python binary download fails; missing termcolor #391

Closed cwule closed 3 years ago

cwule commented 3 years ago

I'm submitting a Bug report

Might be related to #56.

Current behavior

I am using the WinML Dashboard. "Convert" is not yet available and only shows the box "Download a new Python binary to be used exclusively by the WinML Dashboard". When I click that, it starts installing, which eventually fails with the following console output:

start downloading python
start downloading pip
Collecting pip
  Using cached pip-21.1.2-py3-none-any.whl (1.5 MB)
Collecting setuptools
  Using cached setuptools-57.0.0-py3-none-any.whl (821 kB)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
  WARNING: The script wheel.exe is installed in 'C:\Users\cwule\AppData\Local\WinMLDashboard\python\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pip.exe, pip3.6.exe and pip3.exe are installed in 'C:\Users\cwule\AppData\Local\WinMLDashboard\python\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip setuptools wheel
C:\Users\cwule\AppData\Local\WinMLDashboard\python\python.exe: No module named easy_install
Processing c:\users\cwule\appdata\local\winmldashboard\app-0.7.0\resources\app\build\libsvm-3.22-cp36-cp36m-win_amd64.whl
Installing collected packages: libsvm
Successfully installed libsvm-3.22
C:\Users\cwule\AppData\Local\WinMLDashboard\python\python.exe: No module named easy_install
Collecting coremltools_windows==2.0b1
  Using cached coremltools_windows-2.0b1-cp36-none-win_amd64.whl (937 kB)
Collecting winmltools==1.5.1
  Using cached winmltools-1.5.1-py2.py3-none-any.whl (40 kB)
Collecting h5py==2.8.0
  Using cached h5py-2.8.0-cp36-cp36m-win_amd64.whl (2.3 MB)
Collecting tensorflow==1.12.2
  Using cached tensorflow-1.12.2-cp36-cp36m-win_amd64.whl (45.9 MB)
Collecting Keras==2.2.4
  Using cached Keras-2.2.4-py2.py3-none-any.whl (312 kB)
Collecting Keras-Applications==1.0.6
  Using cached Keras_Applications-1.0.6-py2.py3-none-any.whl (44 kB)
Collecting Keras-Preprocessing==1.0.5
  Using cached Keras_Preprocessing-1.0.5-py2.py3-none-any.whl (30 kB)
Collecting protobuf==3.6.1
  Using cached protobuf-3.6.1-cp36-cp36m-win_amd64.whl (1.1 MB)
Collecting PyYAML==4.2b1
  Using cached PyYAML-4.2b1.tar.gz (263 kB)
Collecting scipy==1.1.0
  Using cached scipy-1.1.0-cp36-none-win_amd64.whl (31.1 MB)
Collecting scikit-learn==0.20.1
  Using cached scikit_learn-0.20.1-cp36-cp36m-win_amd64.whl (4.8 MB)
Collecting xgboost==0.81
  Using cached xgboost-0.81-py2.py3-none-win_amd64.whl (7.4 MB)
Collecting lightgbm==2.2.2
  Using cached lightgbm-2.2.2-py2.py3-none-win_amd64.whl (507 kB)
Collecting numpy>=1.10.0
  Using cached numpy-1.19.5-cp36-cp36m-win_amd64.whl (13.2 MB)
Collecting six==1.10.0
  Using cached six-1.10.0-py2.py3-none-any.whl (10 kB)
Collecting numpy>=1.10.0
  Using cached numpy-1.16.4-cp36-cp36m-win_amd64.whl (11.9 MB)
Collecting onnxmltools==1.5.1
  Using cached onnxmltools-1.5.1-py2.py3-none-any.whl (287 kB)
Collecting tf2onnx==1.5.3
  Using cached tf2onnx-1.5.3-py3-none-any.whl (145 kB)
Collecting onnx==1.5.0
  Using cached onnx-1.5.0-cp36-cp36m-win_amd64.whl (4.1 MB)
Collecting astor>=0.6.0
  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting grpcio>=1.8.6
  Using cached grpcio-1.38.0-cp36-cp36m-win_amd64.whl (3.1 MB)
Collecting tensorboard<1.13.0,>=1.12.0
  Using cached tensorboard-1.12.2-py3-none-any.whl (3.0 MB)
Collecting absl-py>=0.1.6
  Using cached absl_py-0.12.0-py3-none-any.whl (129 kB)
Requirement already satisfied: wheel>=0.26 in c:\users\cwule\appdata\local\winmldashboard\python\lib\site-packages (from tensorflow==1.12.2->-r C:\Users\cwule\AppData\Local\WinMLDashboard\app-0.7.0\resources\app\build\requirements.txt (line 4)) (0.36.2)
Collecting termcolor>=1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\cwule\AppData\Local\WinMLDashboard\python\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\cwule\\AppData\\Local\\Temp\\pip-install-9793ql53\\termcolor_bf59a30223664c8f8a895dcae1ada69b\\setup.py'"'"'; __file__='"'"'C:\\Users\\cwule\\AppData\\Local\\Temp\\pip-install-9793ql53\\termcolor_bf59a30223664c8f8a895dcae1ada69b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\cwule\AppData\Local\Temp\pip-pip-egg-info-3hhbavon'
         cwd: C:\Users\cwule\AppData\Local\Temp\pip-install-9793ql53\termcolor_bf59a30223664c8f8a895dcae1ada69b\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\cwule\AppData\Local\Temp\pip-install-9793ql53\termcolor_bf59a30223664c8f8a895dcae1ada69b\setup.py", line 35, in <module>
        from termcolor import VERSION
    ModuleNotFoundError: No module named 'termcolor'
    ----------------------------------------
INFO: pip is looking at multiple versions of h5py to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of winmltools to determine which version is compatible with other requirements. This could take a while.
WARNING: Discarding https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz#sha256=1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b (from https://pypi.org/simple/termcolor/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement termcolor>=1.1.0 (from tensorflow) (from versions: 0.1, 0.1.1, 0.1.2, 0.2, 1.0.0, 1.0.1, 1.1.0)
ERROR: No matching distribution found for termcolor>=1.1.0
INFO: pip is looking at multiple versions of coremltools-windows to determine which version is compatible with other requirements. This could take a while.
Error: Child process C:\Users\cwule\AppData\Local\WinMLDashboard\python\python.exe exited with code 1
    at ChildProcess.<anonymous> (file:///C:/Users/cwule/AppData/Local/WinMLDashboard/app-0.7.0/resources/app/build/static/js/main.5085b59a.js:1:264362)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12): Child process C:\Users\cwule\AppData\Local\WinMLDashboard\python\python.exe exited with code 1

Expected behavior

The python binary installation should finish successfully and enable the "Convert" option.

Minimal reproduction of the problem with instructions

Run WinML Dashboard. Not sure when the Convert option is available and when it only shows the option to download a new python binary.

Environment

Windows Build Number: 20H2 (19042.985)

WinMLTools specific:

tiagoshibata commented 3 years ago

Hey @cwule , we can reproduce it locally and will look into your issue. Thanks for reporting it.

qunliu commented 3 years ago

I see the same issue. I tried both using the prebuilt binary and clone the code then build from source, they are about the same issue. Currently not able to use it on my machine, please fix it or let me know if you have a workaround, thanks!

tiagoshibata commented 3 years ago

Hey @qunliu , can you give #393 a try?

qunliu commented 3 years ago

@tiagoshibata, yeah I did try your branch a couple of days ago, and it worked for me. I was able to get through the python installation process and the model conversion dash board showed up correctly for me. Thanks for the fix!