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

set_up.py missing tensorflow #847

Open
2 tasks done
idiomaticrefactoring opened this issue Dec 22, 2021 · 1 comment
Open
2 tasks done

set_up.py missing tensorflow #847

idiomaticrefactoring opened this issue Dec 22, 2021 · 1 comment
Labels

Comments

@idiomaticrefactoring
Copy link

idiomaticrefactoring commented Dec 22, 2021

Describe the bug

the project needs TensorFlow, but set_up.py does not contain the package. Although the requirements.txt contain the package, but when execute the command: pip install -e ., it will not install the package and occur no module error? Actually, is there any reason that not containing TensorFlow in set_up.py???

To Reproduce

pip3 install -e .
python3 -m pytest -v tests/unit_test/processor_units/test_processor_units.py

============================= test session starts ==============================
platform linux -- Python 3.7.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /mnt/zejun/smp/data/python_star_2000repo/MatchZoo/venv_test_7/bin/python3.7
cachedir: .pytest_cache
rootdir: /mnt/zejun/smp/data/python_star_2000repo/MatchZoo
plugins: cov-3.0.0, mock-3.6.1
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
___ ERROR collecting tests/unit_test/processor_units/test_processor_units.py ___
ImportError while importing test module '/mnt/zejun/smp/data/python_star_2000repo/MatchZoo/tests/unit_test/processor_units/test_processor_units.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.7/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unit_test/processor_units/test_processor_units.py:4: in
from matchzoo.preprocessors import units
matchzoo/init.py:20: in
from . import preprocessors
matchzoo/preprocessors/init.py:1: in
from . import units
matchzoo/preprocessors/units/init.py:13: in
from .tokenize import Tokenize
matchzoo/preprocessors/units/tokenize.py:2: in
from matchzoo.utils.bert_utils import is_chinese_char,
matchzoo/utils/init.py:4: in
from .make_keras_optimizer_picklable import make_keras_optimizer_picklable
matchzoo/utils/make_keras_optimizer_picklable.py:1: in
import keras
venv_test_7/lib/python3.7/site-packages/keras/init.py:21: in
from tensorflow.python import tf2
E ModuleNotFoundError: No module named 'tensorflow'
=========================== short test summary info ============================
ERROR tests/unit_test/processor_units/test_processor_units.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.91s ===============================

Describe your attempts

  • I checked the documentation and found no answer
  • I checked to make sure that this is not a duplicate issue

Context

  • Ubutun
@joelrorseth
Copy link

Bump, I'm getting the same error after pip install matchzoo and attempting to import via import matchzoo as mz.

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

No branches or pull requests

2 participants