Closed johnfelipe closed 3 years ago
now that is my error, how solve it?
Hello ! I think this is probably because of the version to tensorflow on your system. From what I found googling online , you can try downgrading your tensorflow to the 2.3.0v and I think I was also using the same version while doing this project.
Here's a link to the same issue on tf's github : https://github.com/tensorflow/text/issues/385
pls tell me pip command exactly for not get any error
Try this : pip install -U tensorflow==2.3.0 Should this not work , please go through the link I have included in my previous comment. They have discussed more options over there.
root@machineteacheble-ubuntu-s-8vcpu-16gb-nyc1-01:~/1080-Pixels# pip install -U tensorflow==2.3.0
Collecting tensorflow==2.3.0
Using cached tensorflow-2.3.0-cp38-cp38-manylinux2010_x86_64.whl (320.5 MB)
Requirement already satisfied, skipping upgrade: wrapt>=1.11.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.12.1)
Requirement already satisfied, skipping upgrade: termcolor>=1.1.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.1.0)
Requirement already satisfied, skipping upgrade: protobuf>=3.9.2 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (3.17.1)
Collecting scipy==1.4.1
Using cached scipy-1.4.1-cp38-cp38-manylinux1_x86_64.whl (26.0 MB)
Requirement already satisfied, skipping upgrade: astunparse==1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.6.3)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Requirement already satisfied, skipping upgrade: opt-einsum>=2.3.2 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (3.3.0)
Requirement already satisfied, skipping upgrade: tensorboard<3,>=2.3.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (2.5.0)
Collecting tensorflow-estimator<2.4.0,>=2.3.0
Using cached tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
Requirement already satisfied, skipping upgrade: absl-py>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (0.12.0)
Requirement already satisfied, skipping upgrade: google-pasta>=0.1.8 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (0.2.0)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (0.36.2)
Collecting numpy<1.19.0,>=1.16.0
Using cached numpy-1.18.5-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
Collecting h5py<2.11.0,>=2.10.0
Using cached h5py-2.10.0-cp38-cp38-manylinux1_x86_64.whl (2.9 MB)
Requirement already satisfied, skipping upgrade: grpcio>=1.8.6 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.34.1)
Requirement already satisfied, skipping upgrade: keras-preprocessing<1.2,>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.1.2)
Requirement already satisfied, skipping upgrade: six>=1.12.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.3.0) (1.15.0)
Requirement already satisfied, skipping upgrade: setuptools>=41.0.0 in /usr/lib/python3/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (45.2.0)
Requirement already satisfied, skipping upgrade: werkzeug>=0.11.15 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.0.1)
Requirement already satisfied, skipping upgrade: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.8.0)
Requirement already satisfied, skipping upgrade: google-auth<2,>=1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.30.1)
Requirement already satisfied, skipping upgrade: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.4.4)
Requirement already satisfied, skipping upgrade: markdown>=2.6.8 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.2.2)
Requirement already satisfied, skipping upgrade: requests<3,>=2.21.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2.23.0)
Requirement already satisfied, skipping upgrade: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.6.1)
Requirement already satisfied, skipping upgrade: pyasn1-modules>=0.2.1 in /usr/lib/python3/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.2.1)
Requirement already satisfied, skipping upgrade: rsa<5,>=3.1.4; python_version >= "3.6" in /usr/local/lib/python3.8/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (4.7.2)
Requirement already satisfied, skipping upgrade: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (4.2.2)
Requirement already satisfied, skipping upgrade: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.3.0)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.25.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2019.11.28)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2.8)
Requirement already satisfied, skipping upgrade: pyasn1>=0.1.3 in /usr/lib/python3/dist-packages (from rsa<5,>=3.1.4; python_version >= "3.6"->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.4.2)
Requirement already satisfied, skipping upgrade: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.1.0)
ERROR: streamlit 0.82.0 requires pandas>=0.21.0, which is not installed.
ERROR: statsmodels 0.12.2 requires pandas>=0.21, which is not installed.
ERROR: pmdarima 1.8.2 requires pandas>=0.19, which is not installed.
ERROR: gradio 2.0.1 requires pandas, which is not installed.
ERROR: altair 4.1.0 requires pandas>=0.18, which is not installed.
ERROR: rdkit-pypi 2021.3.2.3 has requirement numpy>=1.19, but you'll have numpy 1.18.5 which is incompatible.
ERROR: pmdarima 1.8.2 has requirement numpy~=1.19.0, but you'll have numpy 1.18.5 which is incompatible.
Installing collected packages: numpy, scipy, gast, tensorflow-estimator, h5py, tensorflow
Attempting uninstall: numpy
Found existing installation: numpy 1.19.0
Uninstalling numpy-1.19.0:
Successfully uninstalled numpy-1.19.0
Attempting uninstall: scipy
Found existing installation: scipy 1.6.3
Uninstalling scipy-1.6.3:
Successfully uninstalled scipy-1.6.3
Attempting uninstall: gast
Found existing installation: gast 0.4.0
Uninstalling gast-0.4.0:
Successfully uninstalled gast-0.4.0
Attempting uninstall: tensorflow-estimator
Found existing installation: tensorflow-estimator 2.5.0
Uninstalling tensorflow-estimator-2.5.0:
Successfully uninstalled tensorflow-estimator-2.5.0
Attempting uninstall: h5py
Found existing installation: h5py 3.1.0
Uninstalling h5py-3.1.0:
Successfully uninstalled h5py-3.1.0
Attempting uninstall: tensorflow
Found existing installation: tensorflow 2.5.0
Uninstalling tensorflow-2.5.0:
Successfully uninstalled tensorflow-2.5.0
Successfully installed gast-0.3.3 h5py-2.10.0 numpy-1.18.5 scipy-1.4.1 tensorflow-2.3.1 tensorflow-estimator-2.3.0
root@machineteacheble-ubuntu-s-8vcpu-16gb-nyc1-01:~/1080-Pixels# streamlit run stream.py
Traceback (most recent call last):
File "/usr/local/bin/streamlit", line 5, in <module>
from streamlit.cli import main
File "/usr/local/lib/python3.8/dist-packages/streamlit/__init__.py", line 76, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/usr/local/lib/python3.8/dist-packages/streamlit/delta_generator.py", line 41, in <module>
from streamlit.elements.altair import AltairMixin
File "/usr/local/lib/python3.8/dist-packages/streamlit/elements/altair.py", line 26, in <module>
import altair as alt
File "/usr/local/lib/python3.8/dist-packages/altair/__init__.py", line 4, in <module>
from .vegalite import *
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/__init__.py", line 2, in <module>
from .v4 import *
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/__init__.py", line 2, in <module>
from .schema import *
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/schema/__init__.py", line 2, in <module>
from .core import *
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/schema/core.py", line 4, in <module>
from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
File "/usr/local/lib/python3.8/dist-packages/altair/utils/__init__.py", line 1, in <module>
from .core import (
File "/usr/local/lib/python3.8/dist-packages/altair/utils/core.py", line 14, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
root@machineteacheble-ubuntu-s-8vcpu-16gb-nyc1-01:~/1080-Pixels# ^C
root@machineteacheble-ubuntu-s-8vcpu-16gb-nyc1-01:~/1080-Pixels# pip install pandas
Collecting pandas
Using cached pandas-1.2.4-cp38-cp38-manylinux1_x86_64.whl (9.7 MB)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas) (2021.1)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas) (2.7.3)
Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib/python3.8/dist-packages (from pandas) (1.18.5)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.8/dist-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
ERROR: pmdarima 1.8.2 has requirement numpy~=1.19.0, but you'll have numpy 1.18.5 which is incompatible.
Installing collected packages: pandas
Successfully installed pandas-1.2.4
root@machineteacheble-ubuntu-s-8vcpu-16gb-nyc1-01:~/1080-Pixels# streamlit run stream.py
2021-06-08 05:48:14.450508: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2021-06-08 05:48:14.450569: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
You can now view your Streamlit app in your browser.
Network URL: http://134.209.75.138:8501
External URL: http://134.209.75.138:8501
same error in web ui
AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'
Traceback:
File "/usr/local/lib/python3.8/dist-packages/streamlit/script_runner.py", line 338, in _run_script
exec(code, module.__dict__)
File "/root/1080-Pixels/stream.py", line 4, in <module>
from run import predict_image
File "/root/1080-Pixels/run.py", line 3, in <module>
import keras
File "/usr/local/lib/python3.8/dist-packages/keras/__init__.py", line 20, in <module>
from . import initializers
File "/usr/local/lib/python3.8/dist-packages/keras/initializers/__init__.py", line 124, in <module>
populate_deserializable_objects()
File "/usr/local/lib/python3.8/dist-packages/keras/initializers/__init__.py", line 49, in populate_deserializable_objects
LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
How did you solve this one earlier?
remains same issue Can u test pls in ubuntu 20 for review requeriments and test it Tnks
Okay sure ! I'll update the repository with a requirements.txt in a couple of days( my laptop is out for repair sadly) and then you can re-clone the project and work in virtual environment with the necessary files. Will notify you of the update !
and update cheatsheet with commands exactly for that environment in ubuntu 20 and python3 TNks
El mar, 8 jun 2021 a las 2:25, Tarushi Pathak @.***>) escribió:
Okay sure ! I'll update the repository with a requirements.txt in a couple of days( my laptop is out for repair sadly) and then you can re-clone the project and work in virtual environment with the necessary files. Will notify you of the update !
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tarushi98/SRCNN/issues/4#issuecomment-856526265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFAJXBJAHYL4LYYQFEDTRXAV7ANCNFSM46FQZVYQ .
I will restar in new server from scratch
apt update
apt upgrade
shutdown -r now
wait for reboot
apt install git python3-pip
apt install libopencv-dev python3-opencv
python3 -c "import cv2; print(cv2.__version__)"
4.2.0
pip install streamlit
Stored in directory: /root/.cache/pip/wheels/fc/39/52/8d6f3cec1cca4ceb44d658427c35711b19d89dbc4914af657f
Successfully built pandocfilters
Installing collected packages: pillow, smmap, gitdb, gitpython, numpy, pyarrow, decorator, validators, pytz, tzlocal, astor, python-dateutil, watchdog, pandas, toolz, altair, ipython-genutils, traitlets, jupyter-core, nbformat, jupyterlab-widgets, tornado, pyzmq, jupyter-client, pandocfilters, pygments, jupyterlab-pygments, async-generator, nest-asyncio, nbclient, defusedxml, testpath, webencodings, pyparsing, packaging, bleach, mistune, nbconvert, prometheus-client, Send2Trash, pickleshare, parso, jedi, matplotlib-inline, backcall, wcwidth, prompt-toolkit, ipython, ipykernel, pycparser, cffi, argon2-cffi, ptyprocess, terminado, notebook, widgetsnbextension, ipywidgets, pydeck, toml, cachetools, protobuf, base58, streamlit
Successfully installed Send2Trash-1.5.0 altair-4.1.0 argon2-cffi-20.1.0 astor-0.8.1 async-generator-1.10 backcall-0.2.0 base58-2.1.0 bleach-3.3.0 cachetools-4.2.2 cffi-1.14.5 decorator-5.0.9 defusedxml-0.7.1 gitdb-4.0.7 gitpython-3.1.17 ipykernel-5.5.5 ipython-7.24.1 ipython-genutils-0.2.0 ipywidgets-7.6.3 jedi-0.18.0 jupyter-client-6.1.12 jupyter-core-4.7.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.0 matplotlib-inline-0.1.2 mistune-0.8.4 nbclient-0.5.3 nbconvert-6.0.7 nbformat-5.1.3 nest-asyncio-1.5.1 notebook-6.4.0 numpy-1.20.3 packaging-20.9 pandas-1.2.4 pandocfilters-1.4.3 parso-0.8.2 pickleshare-0.7.5 pillow-8.2.0 prometheus-client-0.11.0 prompt-toolkit-3.0.18 protobuf-3.17.3 ptyprocess-0.7.0 pyarrow-4.0.1 pycparser-2.20 pydeck-0.6.2 pygments-2.9.0 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2021.1 pyzmq-22.1.0 smmap-4.0.0 streamlit-0.82.0 terminado-0.10.0 testpath-0.5.0 toml-0.10.2 toolz-0.11.1 tornado-6.1 traitlets-5.0.5 tzlocal-2.1 validators-0.18.2 watchdog-2.1.2 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.5.1
and next
pip install streamlit --upgrade
git clone https://github.com/Data-Science-Community-SRM/1080-Pixels.git
cd 1080-Pixels/
pip install -U tensorflow==2.3.0
pip install keras
streamlit run stream.py
And is working
how solve that?