Open XiaoyuZhan123 opened 1 year ago
Could you please verify your tf version using tf.__version__
?
Thank you for your reply. I checked the version and they are correct(python3.7.16 and tensorflow1.15.0). I found that when I installed tensorflow1.15 in conda environment, tensorflow-estimator was the latest one installed automatically. I tried lowering the version of tensorflow-estimator to 1.15, which solved the problem successfully.
But when I was running the program, I found another problem: ImportError: DLL load failed while importing _imaging: The specified module could not be found. I tried installing pillow and scikit-image, but it still doesn't work.
Here is my conda environment:
_tflow_select 2.2.0 eigen
absl-py 0.15.0 pyhd3eb1b0_0
aiohttp 3.8.3 py37h2bbff1b_0
aiosignal 1.2.0 pyhd3eb1b0_0
alabaster 0.7.12 py37_0
arrow 1.2.3 py37haa95532_1
astor 0.8.1 py37haa95532_0
astroid 2.14.2 py37haa95532_0
async-timeout 4.0.2 py37haa95532_0
asynctest 0.13.0 py_0
atomicwrites 1.4.0 py_0
attrs 22.1.0 py37haa95532_0
autograd 1.2 py_1 conda-forge/label/cf201901
autopep8 1.6.0 pyhd3eb1b0_1
babel 2.11.0 py37haa95532_0
backcall 0.2.0 pyhd3eb1b0_0
bcrypt 3.2.0 py37h2bbff1b_1
binaryornot 0.4.4 pyhd3eb1b0_1
black 22.6.0 py37haa95532_0
blas 1.0 mkl
bleach 4.1.0 pyhd3eb1b0_0
blinker 1.4 py37haa95532_0
brotli 1.0.2 vc14_0 [vc14] conda-forge/label/cf201901
brotlipy 0.7.0 py37h2bbff1b_1003
ca-certificates 2023.01.10 haa95532_0 anaconda
cachetools 4.2.2 pyhd3eb1b0_0
certifi 2022.12.7 py37haa95532_0 anaconda
cffi 1.15.1 py37h2bbff1b_3
chardet 4.0.0 py37haa95532_1003
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.0.4 py37haa95532_0
cloudpickle 2.0.0 pyhd3eb1b0_0
colorama 0.4.6 py37haa95532_0
cookiecutter 1.7.3 pyhd3eb1b0_0
cryptography 39.0.1 py37h21b164f_0
cycler 0.10.0 py_1 conda-forge/label/cf201901
cytoolz 0.12.0 py37h2bbff1b_0 anaconda
dask-core 2021.10.0 pyhd3eb1b0_0 anaconda
debugpy 1.5.1 py37hd77b12b_0
decorator 5.1.1 pyhd3eb1b0_0
defusedxml 0.7.1 pyhd3eb1b0_0
diff-match-patch 20200713 pyhd3eb1b0_0
dill 0.3.6 py37haa95532_0
docutils 0.18.1 py37haa95532_3
entrypoints 0.4 py37haa95532_0
fftw 3.3.9 h2bbff1b_1
flake8 4.0.1 pyhd3eb1b0_1
flit-core 3.6.0 pyhd3eb1b0_0
fonttools 4.25.0 pyhd3eb1b0_0
freetype 2.12.1 ha860e81_0
frozenlist 1.3.3 py37h2bbff1b_0
fsspec 2022.11.0 py37haa95532_0 anaconda
future 0.17.1 py37_1000 conda-forge/label/cf201901
gast 0.2.2 py37_0
google-auth 2.6.0 pyhd3eb1b0_0
google-auth-oauthlib 0.4.4 pyhd3eb1b0_0
google-pasta 0.2.0 pyhd3eb1b0_0
grpcio 1.42.0 py37hc60d5dd_0
h5py 3.7.0 py37h3de5c98_0
hdf5 1.10.6 h1756f20_1
icc_rt 2022.1.0 h6049295_2
icu 58.2 ha925a31_3
idna 3.4 py37haa95532_0
imageio 2.19.3 py37haa95532_0 anaconda
imagesize 1.4.1 py37haa95532_0
importlib-metadata 4.11.3 py37haa95532_0
importlib_metadata 4.11.3 hd3eb1b0_0
importlib_resources 5.2.0 pyhd3eb1b0_1
inflection 0.5.1 py37haa95532_0
intel-openmp 2021.4.0 haa95532_3556
intervaltree 3.1.0 pyhd3eb1b0_0
ipykernel 6.9.1 py37haa95532_0
ipython 7.31.1 py37haa95532_1
ipython_genutils 0.2.0 pyhd3eb1b0_1
isort 5.9.3 pyhd3eb1b0_0
jedi 0.18.1 py37haa95532_1
jellyfish 0.9.0 py37h2bbff1b_0
jinja2 3.1.2 py37haa95532_0
jinja2-time 0.2.0 pyhd3eb1b0_3
joblib 1.1.1 py37haa95532_0 anaconda
jpeg 9b vc14_1 [vc14] conda-forge/label/cf201901
jsonschema 4.17.3 py37haa95532_0
jupyter_client 7.1.2 pyhd3eb1b0_0
jupyter_core 4.11.2 py37haa95532_0
jupyterlab_pygments 0.1.2 py_0
keras-applications 1.0.8 py_1
keras-preprocessing 1.1.2 pyhd3eb1b0_0
keyring 23.4.0 py37haa95532_0
kiwisolver 1.0.1 py37he980bc4_1002 conda-forge/label/cf201901
lazy-object-proxy 1.6.0 py37h2bbff1b_0
libpng 1.6.39 h8cc25b3_0
libprotobuf 3.20.3 h23ce68f_0
libsodium 1.0.18 h62dcd97_0
libspatialindex 1.9.3 h6c2663c_0
libtiff 4.0.6 vc14_6 [vc14] conda-forge/label/cf201901
libwebp 1.0.0 vc14h36c3e75_0 [vc14] conda-forge/label/cf201901
locket 1.0.0 py37haa95532_0 anaconda
markdown 3.4.1 py37haa95532_0
markupsafe 2.1.1 py37h2bbff1b_0
matplotlib 3.5.3 py37haa95532_0
matplotlib-base 3.5.3 py37hd77b12b_0
matplotlib-inline 0.1.6 py37haa95532_0
mccabe 0.6.1 py37haa95532_2
mistune 0.8.4 py37hfa6e2cd_1001
mkl 2021.4.0 haa95532_640
mkl-service 2.4.0 py37h2bbff1b_0
mkl_fft 1.3.1 py37h277e83a_0
mkl_random 1.2.2 py37hf11a4ad_0
multidict 6.0.2 py37h2bbff1b_0
munkres 1.0.12 py_0 conda-forge/label/cf201901
mypy_extensions 0.4.3 py37haa95532_1
nbclient 0.5.13 py37haa95532_0
nbconvert 6.4.1 py37haa95532_0
nbformat 5.7.0 py37haa95532_0
nest-asyncio 1.5.6 py37haa95532_0
networkx 2.6.3 pyhd3eb1b0_0 anaconda
numpy 1.21.5 py37h7a0a035_3 anaconda
numpy-base 1.21.5 py37hca35cd5_3
numpydoc 1.5.0 py37haa95532_0
oauthlib 3.2.1 py37haa95532_0
openssl 1.1.1s h2bbff1b_0 anaconda
opt_einsum 3.3.0 pyhd3eb1b0_1
packaging 22.0 py37haa95532_0
pandocfilters 1.5.0 pyhd3eb1b0_0
paramiko 2.8.1 pyhd3eb1b0_0
parso 0.8.3 pyhd3eb1b0_0
partd 1.2.0 pyhd3eb1b0_1 anaconda
pathspec 0.10.3 py37haa95532_0
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 9.3.0 py37hdc2b20a_1 anaconda
pip 22.3.1 py37haa95532_0
pkgutil-resolve-name 1.3.10 py37haa95532_0
platformdirs 2.5.2 py37haa95532_0
pluggy 1.0.0 py37haa95532_1
poyo 0.5.0 pyhd3eb1b0_0
prompt-toolkit 3.0.36 py37haa95532_0
protobuf 3.20.3 py37hd77b12b_0
psutil 5.9.0 py37h2bbff1b_0
ptyprocess 0.7.0 pyhd3eb1b0_2
pyasn1 0.4.8 pyhd3eb1b0_0
pyasn1-modules 0.2.8 py_0
pycodestyle 2.8.0 pyhd3eb1b0_0
pycparser 2.21 pyhd3eb1b0_0
pydocstyle 6.3.0 py37haa95532_0
pydoe 0.3.8 py_1 conda-forge/label/cf201901
pyflakes 2.4.0 pyhd3eb1b0_0
pygments 2.11.2 pyhd3eb1b0_0
pyjwt 2.4.0 py37haa95532_0
pylint 2.16.2 py37haa95532_0
pyls-spyder 0.4.0 pyhd3eb1b0_0
pynacl 1.5.0 py37h8cc25b3_0
pyopenssl 23.0.0 py37haa95532_0
pyparsing 2.3.0 py_0 conda-forge/label/cf201901
pyqt 5.9.2 py37h6538335_2
pyrsistent 0.18.0 py37h196d8e1_0
pysocks 1.7.1 py37_1
python 3.7.16 h6244533_0
python-dateutil 2.7.5 py_0 conda-forge/label/cf201901
python-fastjsonschema 2.16.2 py37haa95532_0
python-lsp-black 1.0.0 pyhd3eb1b0_0
python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0
python-lsp-server 1.3.3 pyhd3eb1b0_0
python-slugify 5.0.2 pyhd3eb1b0_0
pytoolconfig 1.2.5 py37haa95532_1
pytz 2022.7 py37haa95532_0
pywavelets 1.3.0 py37h2bbff1b_0 anaconda
pywin32 305 py37h2bbff1b_0
pywin32-ctypes 0.2.0 py37_1001
pyyaml 6.0 py37h2bbff1b_1
pyzmq 23.2.0 py37hd77b12b_0
qdarkstyle 3.0.2 pyhd3eb1b0_0
qstylizer 0.2.2 py37haa95532_0
qt 5.9.7 vc14h73c81de_0
qtawesome 1.2.2 py37haa95532_0
qtconsole 5.2.2 pyhd3eb1b0_0
qtpy 2.2.0 py37haa95532_0
requests 2.28.1 py37haa95532_0
requests-oauthlib 1.3.0 py_0
rope 1.7.0 py37haa95532_0
rsa 4.7.2 pyhd3eb1b0_1
rtree 1.0.1 py37h2eaa2aa_0
scikit-image 0.19.3 py37hd77b12b_1 anaconda
scikit-learn 1.0.2 py37hf11a4ad_1 anaconda
scipy 1.7.3 py37h7a0a035_2
setuptools 65.6.3 py37haa95532_0
sip 4.19.8 py37h6538335_1000 conda-forge/label/cf201901
six 1.16.0 pyhd3eb1b0_1
snowballstemmer 2.2.0 pyhd3eb1b0_0
sortedcontainers 2.4.0 pyhd3eb1b0_0
sphinx 5.0.2 py37haa95532_0
sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0
sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0
sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0
sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0
sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0
sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0
spyder 5.2.2 py37haa95532_1
spyder-kernels 2.2.1 py37haa95532_0
sqlite 3.41.2 h2bbff1b_0
tensorboard 2.8.0 py37haa95532_0
tensorboard-data-server 0.6.1 py37haa95532_0
tensorboard-plugin-wit 1.8.1 py37haa95532_0
tensorflow 1.15.0 eigen_py37h9f89a44_0
tensorflow-base 1.15.0 eigen_py37h07d2309_0
tensorflow-estimator 1.15.1 pyh2649769_0
termcolor 1.1.0
testpath` 0.6.0 py37haa95532_0
text-unidecode 1.3 pyhd3eb1b0_0
textdistance 4.2.1 pyhd3eb1b0_0
threadpoolctl 2.2.0 pyh0d69192_0 anaconda
three-merge 0.1.1 pyhd3eb1b0_0
tifffile 2020.10.1 py37h8c2d366_2 anaconda
tinycss2 1.2.1 py37haa95532_0
tk 8.5.19 vc14_0 [vc14] conda-forge/label/cf201901
toml 0.10.2 pyhd3eb1b0_0
tomli 2.0.1 py37haa95532_0
tomlkit 0.11.1 py37haa95532_0
toolz 0.12.0 py37haa95532_0 anaconda
tornado 5.1.1 py37hfa6e2cd_1000 conda-forge/label/cf201901
traitlets 5.7.1 py37haa95532_0
typed-ast 1.4.3 py37h2bbff1b_1
typing-extensions 4.4.0 py37haa95532_0
typing_extensions 4.4.0 py37haa95532_0
ujson 5.4.0 py37hd77b12b_0
unidecode 1.2.0 pyhd3eb1b0_0
urllib3 1.26.14 py37haa95532_0
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
watchdog 2.1.6 py37haa95532_0
wcwidth 0.2.5 pyhd3eb1b0_0
webencodings 0.5.1 py37_1
werkzeug 0.16.1 py_0
wheel 0.38.4 py37haa95532_0
win_inet_pton 1.1.0 py37haa95532_0
wincertstore 0.2 py37haa95532_2
wrapt 1.14.1 py37h2bbff1b_0
yaml 0.2.5 he774522_0
yapf 0.31.0 pyhd3eb1b0_0
yarl 1.8.1 py37h2bbff1b_0
zeromq 4.3.4 hd77b12b_0
zipp 3.11.0 py37haa95532_0
zlib 1.2.13 h8cc25b3_0
Seems this is also a package version issue: https://stackoverflow.com/a/43294088 Please try downgrading Pillow to 4.0.0 as mentioned in the post.
Thank you for your help, this method should be useful, but in the process of trying to fix it, I found that there seems to be an incompatibility between pillow and matplotlib. I removed pillow and matplotlib, used pip to install them instand conda install and solved the problem successfully. If anyone has a similar problem, maybe can have a try.
I try to run the script with python3.7.16 and tensorflow1.15.0(or tensorflow 1.13.0), but I get the error: tensorflow' has no attribute 'placeholder'. I tried some solutions on the Internet, but still can't solve it. I would be very grateful if you could give me some help.