-
Notifications
You must be signed in to change notification settings - Fork 346
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
tensorflow-text not compatible with Conda -- NotFound error upon import #644
Comments
The "undefined symbol" error means there is a disconnect in the ABI versions. TF Text is making a call to the TF library using an identifier that does not exist - almost always using incompatible library versions. I noticed that your miniconda environment is named "tfenvnightly" and you do not have a !pip install for tensorflow-gpu; are you certain you are not using a nightly version of TF? I tried the versions you specified in a colab instance and didn't receive any errors. |
@broken Sorry for the confusion. "nightly" is just the name for the virtual environment created as I first was going to install tf nighlty version which I did not install. I did not use pip to install tf-gpu. Used
|
Thanks for the commands, I just tested this and got the same error. Doing a It looks like anaconda rebuilt the library in a way that changed the symbol table to the TF library file. Personally, I always found it odd they have their own package install. No other Python environment does this, and it doesn't seem convenient to have to learn another package install command... The only reason had to be they were altered for the environment. My guess is some base library was altered for the environment setup to work correctly, which had the effect of having to change libs with it as a dependency and so forth, and once you start having your own personalized libraries, you always need them and the requirements branch out and you run into problems like this one for packages that have not been absorbed in your ecosystem. So while pip installing tf fixes this problem, I cannot guarantee that later tf will not have a problem with some library it depends on. Anyway, you can see the differences here. I installed with your same procedure. Then executed the following commands: (i644) $ md5sum libtensorflow_framework.so.2 |
@broken thanks for the answer. I saw somewhere before, that pip and conda libraries working together could make conflicts, I think it was your answer to a previous issue. Anyway, I will also try this and post here. |
@broken This resolved the previous importing error. But it again falls back to CPU as tested by |
Interesting; something like this is exactly what I was afraid of and why I mentioned that you may run into problems with TF and libs it depends on. So yes, until Conda decides to add tf-text as a supported library, it is incompatible in a conda environment if you want GPU support. |
Thanks for the response and letting us know about this incompatibility. I updated the title of this issue to make it easier for others to find, and I'll have this noted in our documentation. |
I think the easiest long-term solution is to start building tensorflow-text in the conda-forge channel. Installing Tensorflow from pip is not an easy solution for anyone who is already using conda, because of other transitive dependencies. For example, CUDA drivers from conda are not compatible with Tensorflow from pip. The same is probably true about other ABI-sensitive dependencies. This issue should probably be raised in https://github.com/conda-forge/tensorflow-feedstock |
On behalf for issues: - tensorflow/text#644 - conda-forge/tensorflow-feedstock#276 (comment) A recipe for [tensorflow-hub](https://www.tensorflow.org) is provided
I am using tensorflow-gpu (2.4.1) with Python 3.7 and CUDA 10.1 on Ubuntu 20.04 with miniconda3. I install tensorflow-text with
pip install tensorflow-text==2.4.1
and it completes without error. When I try to import the module it throws the below error,However, if I do not specify tensorflow-text version it installs tensorflow 2.5 (CPU) version and works on it. (removing the 2.4.1 GPU version)
The text was updated successfully, but these errors were encountered: