MycroftAI / mycroft-precise

A lightweight, simple-to-use, RNN wake word listener
Apache License 2.0
838 stars 226 forks source link

I am getting the following error while running ./setup.sh. ERROR: Could not find a version that satisfies the requirement tensorflow<1.14,>=1.13 (from mycroft-precise==0.3.0) (from versions: none) #109

Open mgrove6 opened 4 years ago

mgrove6 commented 4 years ago

ERROR: Could not find a version that satisfies the requirement tensorflow<1.14,>=1.13 (from mycroft-precise==0.3.0) (from versions: none) ERROR: No matching distribution found for tensorflow<1.14,>=1.13 (from mycroft-precise==0.3.0)

el-tocino commented 4 years ago

try pip3 install tensorflow==1.11 Should show you the versions available if not, check if there's a 1.13 on your platform.

docholiday commented 4 years ago

I get the same error as mgrove6. The command by el-tocino gives me the same error, only for version 11.11 now:

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

stratus-ss commented 4 years ago

I have the same problem on Ubuntu 20.04

ERROR: Could not find a version that satisfies the requirement tensorflow<1.14,>=1.13 (from mycroft-precise==0.3.0) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3)
ERROR: No matching distribution found for tensorflow<1.14,>=1.13 (from mycroft-precise==0.3.0)

and a manual attempt

pip3 install tensorflow==11.11
ERROR: Could not find a version that satisfies the requirement tensorflow==11.11 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3)
ERROR: No matching distribution found for tensorflow==11.11
janvda commented 4 years ago

I am getting same problem when starting from docker application from python:3 in my dockerfile.

to fix this I have used following docker application from tensorflow/tensorflow:1.13.0rc2-py3

So my complete dockerfile looks like:

from tensorflow/tensorflow:1.13.0rc2-py3

WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y  git sudo

RUN git clone https://github.com/mycroftai/mycroft-precise
WORKDIR /usr/src/app/mycroft-precise
RUN ./setup.sh

# replace below command by actual command you want to run 
CMD [ "sleep", "10000" ]
forslund commented 4 years ago

As far as I been able to determine this is an issue with python 3.8+ support. The tensorflow version used (needed?) isn't available if python > 3.7 causing this issue.

If you're running docker, try a python:3,7 version of the container and see if that helps.

There has been a lot of work to update the TF version in PR #141, and I think that should work with newer pythons.

0vermind commented 3 years ago

This issue is still there. Ubuntu 20.04.1 Linux T14 5.4.0-42-generic #46-Ubuntu x86_64 x86_64 x86_64 GNU/Linux Python 3.8.5 pip 20.2.3 mycroft-core from git repo trying to install precise from git as per documentation. Are the docs lagging behind the development?

forslund commented 3 years ago

No as stated above the problem is python versions...The current combo of packages aren't available for python 3.8. Try the PR for updating tensorflow which should work.

utaccn commented 3 years ago

Hi, I was getting the same error, so I have tried to download the PR 141, that @forslund was suggesting. The downloading worked fine, but now, when I run the training with precise-train, I got the following error:

Traceback (most recent call last): File "/home/utakkn/mycroft-precise/.venv/bin/precise-train", line 33, in sys.exit(load_entry_point('mycroft-precise', 'console_scripts', 'precise-train')()) File "/home/utakkn/mycroft-precise/.venv/bin/precise-train", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/home/utakkn/mycroft-precise/precise/scripts/train.py", line 16, in from tensorflow.keras.callbacks import LambdaCallback File "/home/utakkn/mycroft-precise/.venv/lib/python3.8/site-packages/tensorflow/init.py", line 41, in from tensorflow.python.tools import module_util as _module_util File "/home/utakkn/mycroft-precise/.venv/lib/python3.8/site-packages/tensorflow/python/init.py", line 50, in from tensorflow.python import pywrap_tensorflow ImportError: cannot import name 'pywrap_tensorflow' from partially initialized module 'tensorflow.python' (most likely due to a circular import) (/home/utakkn/mycroft-precise/.venv/lib/python3.8/site-packages/tensorflow/python/init.py)

Do you think it is a problem with tensorflow and python3.8?

MatthewScholefield commented 3 years ago

The internet suggests you can solve your problem by running pip install tensorflow --upgrade --force-reinstall inside the venv (after running source .venv/bin/activate). For reference, I just searched "from tensorflow.python import pywrap_tensorflow ImportError: cannot import name" on Google.

utaccn commented 3 years ago

Thanks for the fast reply. I have done that but still seems to not be working. I get the following error;

tensorflow 2.3.1 requires tensorboard<3,>=2.3.0, but you'll have tensorboard 2.2.0 which is incompatible. tensorflow-gpu 2.2.0 requires tensorflow-estimator<2.3.0,>=2.2.0, but you'll have tensorflow-estimator 2.3.0 which is incompatible. tensorflow-cpu 2.2.0 requires tensorflow-estimator<2.3.0,>=2.2.0, but you'll have tensorflow-estimator 2.3.0 which is incompatible.

I then tried to install different versions of tensorflow without fixing my problem. The version 2.2.0 and 2.2.0rc2 seems to be working, but they raise me an error saying;

Illegal instruction (core dumped)

Which seems that my CPU can not compute this thing. I'm really stuck here now.

modern-online commented 3 years ago

I had the same problem (and I believe this thread provided a theoretical solution without much detail for me, a noob).

Anyway, my solution (Ubuntu20.04) was to install Python3.6 (3.7 also supports TF 1.x apparently): $ add-apt-repository ppa:deadsnakes/ppa $ apt-get update $ apt-get install python3.6

Install dev tools for the fresh python version (otherwise building pyaudio will fail): $ apt-get install python3.6-dev

After cloning the 'Precise' repo, edit setup.sh script: line51: python3 -m venv "$VENV" --without pip; change to python3.6 -m venv "$VENV" --without pip;

This will initialize virtual environment with the correct python version and allow installing older tensorflow. Hopefully they add TF2 support soon!

wjz27 commented 3 years ago

I met same issue using setup.sh to build.

But directly using the last few lines inside setup.sh could run pass.

    pip install -e runner/
    pip install -e .

Could see the requirements are actually met:

Requirement already satisfied: tensorflow-estimator<1.14.0rc0,>=1.13.0 in /usr/local/lib/python3.7/site-packages (from tensorflow<1.14,>=1.13->mycroft-precise==0.3.0) (1.13.0)