Accenture / AmpliGraph

Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.14k stars 251 forks source link

Module Error #225

Closed ziwli closed 3 years ago

ziwli commented 3 years ago

hello, when I run the example code of 'save and restore model', I failed. There exists an error 'from tensorflow.contrib.tensorboard.plugins import projector ModuleNotFoundError: No module named 'tensorflow.contrib''. Can I ask how to deal with this?

sumitpai commented 3 years ago

you must install tensorflow 1.13 onwards to use ampligraph

if you have a GPU, then do the following: pip install tensorflow-gpu==1.13

if you do not have a gpu: pip install tensorflow==1.13

lukostaz commented 3 years ago

@ziwli , check this out to install the most updated version of tf for ampligraph.

ziwli commented 3 years ago

Dear Sir or Madam,

  I have installed the tensowflow and install again according to the

website tutorial, but still could not work. The error is same....

On Thu, 11 Feb 2021 at 10:08, sumitpai notifications@github.com wrote:

you must install tensorflow 1.13 onwards to use ampligraph

if you have a GPU, then do the following: pip install tensorflow-gpu==1.13

if you do not have a gpu: pip install tensorflow==1.13

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Accenture/AmpliGraph/issues/225#issuecomment-777296650, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQ6JMTKSKMCL7NQIBLCQA3S6ONCDANCNFSM4XNQZV7Q .

ziwli commented 3 years ago

Dear sir or madam,

 I think I have found the issue, that when I install tensorflow

1.0, tensorflow is wrong 'ModuleNotFoundError: No module named 'tensorflow''; when I install tensorflow 2.0, tensorflow.contrib(in model_utils) is wrong.... I don't know if someone has the problem like me. I also re-install all the env according to your tutorial. But there always something wrong with that....I use pycharm

Best wishes Ziwei Li

On Thu, 11 Feb 2021 at 10:08, sumitpai notifications@github.com wrote:

you must install tensorflow 1.13 onwards to use ampligraph

if you have a GPU, then do the following: pip install tensorflow-gpu==1.13

if you do not have a gpu: pip install tensorflow==1.13

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Accenture/AmpliGraph/issues/225#issuecomment-777296650, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQ6JMTKSKMCL7NQIBLCQA3S6ONCDANCNFSM4XNQZV7Q .

lukostaz commented 3 years ago

@ziwli the latest stable release of ampligraph (1.3.2) runs on tensorflow 1.x. It is not (yet) compatible with tf 2.x.

To install the correct version of tf:

pip install "tensorflow>=1.15.2,<2.0"

or

conda install tensorflow'>=1.15.2,<2.0.0'