jfkirk / tensorrec

A TensorFlow recommendation algorithm and framework in Python.
Apache License 2.0
1.28k stars 222 forks source link

Tensorrec environment issues #151

Open progen opened 5 years ago

progen commented 5 years ago

Hi! I'm currently encountering this error when i run the code: Traceback (most recent call last): File "tensorrec.py", line 2, in import tensorrec File "/Users/tensorrec.py", line 5, in model = tensorrec.TensorRec() AttributeError: module 'tensorrec' has no attribute 'TensorRec'

I noticed another user has raised this issue before but there was no solution. My python versions are as follows: python --version Python 2.7.10 python3 --version Python 3.6.1

Here's a pip freeze of my environment: absl-py==0.7.1 appnope==0.1.0 astor==0.8.0 attrs==19.1.0 backcall==0.1.0 bleach==3.1.0 decorator==4.4.0 defusedxml==0.6.0 entrypoints==0.3 gast==0.2.2 google-pasta==0.1.7 grpcio==1.23.0 h5py==2.9.0 ipykernel==5.1.2 ipython==7.7.0 ipython-genutils==0.2.0 ipywidgets==7.5.1 jedi==0.15.1 Jinja2==2.10.1 jsonschema==3.0.2 jupyter==1.0.0 jupyter-client==5.3.1 jupyter-console==6.0.0 jupyter-core==4.5.0 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.0 Markdown==3.1.1 MarkupSafe==1.1.1 mistune==0.8.4 nbconvert==5.6.0 nbformat==4.4.0 notebook==6.0.0 numpy==1.17.0 pandocfilters==1.4.2 parso==0.5.1 pexpect==4.7.0 pickleshare==0.7.5 prometheus-client==0.7.1 prompt-toolkit==2.0.9 protobuf==3.9.1 ptyprocess==0.6.0 Pygments==2.4.2 pyrsistent==0.15.4 python-dateutil==2.8.0 pyzmq==18.1.0 qtconsole==4.5.3 scipy==1.3.1 Send2Trash==1.5.0 six==1.11.0 tensorboard==1.14.0 tensorflow==1.14.0 tensorflow-estimator==1.14.0 tensorrec==0.26.2 termcolor==1.1.0 terminado==0.8.2 testpath==0.4.2 tornado==6.0.3 traitlets==4.3.2 wcwidth==0.1.7 webencodings==0.5.1 Werkzeug==0.15.5 widgetsnbextension==3.5.1 wrapt==1.11.2

maleeham commented 5 years ago

try installing tensorflow==1.7.0

progen commented 5 years ago

tried installing tensorflow1.7.0 but still have the same issues

maleeham commented 5 years ago

After installing tensorflow 1.7.0 try this command:

pip install tensorrec --ignore-installed

I had the same problem and this worked!

progen commented 5 years ago

After installing tensorflow 1.7.0 try this command:

pip install tensorrec --ignore-installed

I had the same problem and this worked!

Still does not work. Seems that after i did that it reverted tensorflow to tensorflow1.14

:pip install tensorrec --ignore-installed Installing collected packages: wheel, gast, google-pasta, six, numpy, absl-py, grpcio, setuptools, markdown, werkzeug, protobuf, tensorboard, tensorflow-estimator, wrapt, keras-preprocessing, astor, h5py, keras-applications, termcolor, tensorflow, scipy, tensorrec Successfully installed absl-py-0.8.0 astor-0.8.0 gast-0.3.1 google-pasta-0.1.7 grpcio-1.23.0 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 numpy-1.17.2 protobuf-3.9.1 scipy-1.3.1 setuptools-41.2.0 six-1.11.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 tensorrec-0.26.2 termcolor-1.1.0 werkzeug-0.15.6 wheel-0.33.6 wrapt-1.11.2

akanellop commented 4 years ago

Hello, I also ran the same code and the same error occured. I noticed that I have saved the code in a file named "tensorrec.py", when I changed that there was no issue with the import statement. So if you named your file tensorrec.py, try changing it. I hope that was the problem for you too.