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

[BUG] Installation issue #796

Closed
xfanak opened this issue Jun 25, 2021 · 4 comments · Fixed by #797
Closed

[BUG] Installation issue #796

xfanak opened this issue Jun 25, 2021 · 4 comments · Fixed by #797

Comments

@xfanak
Copy link

xfanak commented Jun 25, 2021

Dear dp developers,

I'm trying to install the python interface of deepmd-kit only. I noted that someone had the similar issue: #557, and I thought it could be the tensorflow's bug. But I couldn't solve it even if I tried the solutions given here: tensorflow/text#385

I created an empty conda environment first, and set the python version to be 3.8.
Then, I installed tensorflow-cpu (2.5.0) and deepmd-kit 1.3.3 using pip command: pip install tensorflow-cpu/deepmd-kit .
But the dp can not run properly:
image

The problem was solved when I switched to deepmd-kit 1.3.4 using
'pip install git+https://github.com/deepmodeling/deepmd-kit', instead of simply 'pip install deepmd-kit'.
Update the deepmd-kit wheel may prevent similar problems in the future.

Thanks.

@xfanak xfanak added the bug label Jun 25, 2021
@njzjz
Copy link
Member

njzjz commented Jun 25, 2021

This wheel was built against TensorFlow 2.4, so you will se incompatibility when you are using TensorFlow 2.5.
Pypi does not allow updating files so we cannot help.

@njzjz njzjz closed this as completed Jun 25, 2021
@njzjz njzjz reopened this Jun 25, 2021
@njzjz
Copy link
Member

njzjz commented Jun 25, 2021

I am considering to add a message before loading library, so one can know what happened and what to do.

njzjz added a commit to njzjz/deepmd-kit that referenced this issue Jun 25, 2021
@njzjz njzjz linked a pull request Jun 25, 2021 that will close this issue
@xfanak
Copy link
Author

xfanak commented Jun 26, 2021

Thanks for the comments. I did more tests, dp1.3.3 is compatible with tf 2.4 only, but dp 1.3.4 works fine with tf 2.3, 2.4, and 2.5.

@xfanak xfanak closed this as completed Jun 26, 2021
@xfanak xfanak reopened this Jun 26, 2021
@njzjz
Copy link
Member

njzjz commented Jun 26, 2021

When you pip install git+https://github.com/deepmodeling/deepmd-kit, you are actually building from the source but not the wheel. So the ABI will be consistent with the runtime. You can get the same result if you executing pip install deepmd-kit --no-binary deepmd-kit.

amcadmus pushed a commit that referenced this issue Jun 26, 2021
* throw a message if tf runtime is incompatible

fix #557 and #796.

* still raise if tf version is correct

* detect TF_CXX11_ABI_FLAG

* format codes

* fix lint

* move messages into the function

* fix lint

* fix lints
@njzjz njzjz closed this as completed Jun 26, 2021
gzq942560379 pushed a commit to HPC-AI-Team/deepmd-kit that referenced this issue Sep 2, 2021
* throw a message if tf runtime is incompatible

fix deepmodeling#557 and deepmodeling#796.

* still raise if tf version is correct

* detect TF_CXX11_ABI_FLAG

* format codes

* fix lint

* move messages into the function

* fix lint

* fix lints
njzjz pushed a commit to njzjz/deepmd-kit that referenced this issue Sep 21, 2023
@njzjz njzjz added Docs and removed document labels Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants