-
Notifications
You must be signed in to change notification settings - Fork 347
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
ERROR: Could not find a version that satisfies the requirement tensorflow_text (from versions: none) #823
Comments
We currently do not have a prebuilt pip package for M1s. Our release infra is tied to core tensorflow, so it will remain this way until they provide an option too. See #654 |
That said, we do have targets for building it yourself. View #756 for a healthy discussion on getting this working. |
Regarding your failure:
The command looks different from what is checked in. The double quotes have been translated to single quotes, etc. Did you run some replacement utility over the files? |
No, I did this as per the Installation section. I cloned the repo and when I run this command |
Can you look at that file and make sure it mirrors what is here? https://github.com/tensorflow/text/blob/master/oss_scripts/prepare_tf_dep.sh In particular, look at the types of quotes used. Maybe replace the file manually if possible. The point of this script is to make certain that tf text is building against the version of tensorflow you have installed. |
moving discussion here from #756 so far: next fail is at |
@yulsa @yuyuan20 it looks like there are two issues.
The point of this file is to make certain you are building tf text against the same version of tf that you have installed. However, it looks like tensorflow-macos does not populate the git_version variable, and since you are not doing a custom build of TF and building against nightly, you should be able to use the default that is set in the branch. Thus, you can simply remove the prepare_tf_dep.sh line from the build script and I expect you will be fine. |
@broken maybe there is a way to find the git version manually? can't seem to find anywhere... |
I'm in the same spot. Try updating this file starting at line 48.
This takes me past that error but onto a new one. |
what's the new error? |
A couple things to confirm:
ps. FYI; I saw that legacyai shared their built wheel here on the previous PR. I have no idea of the authenticity package, so typical 'use at your own risk' disclaimer. |
the first time I ran the script, was prompted to use Bazel 4.2.2, not sure if makes any difference, but that's the one I configured. do you mean should change it to 3.7.2 to run the script? |
No. 4.2.2 should be good. I must be misremembering and 3.7.2 was for tf text 2.6.x and below. |
Did it and now it's a new error (the complete log is a bit long so I am just stating a portion of it).
|
You are erroring on the |
I was able to build and install tensorflow_text (.whl) for my Apple Macbook Air with the M1 processor following the discussion on this issue by making the following two changes as detailed above:-
cc_toolchain_suite( |
Hello. Successfully installed |
Hello, following exactly the instructions above (python 3.9) I keep getting a compiler error that I don't know how to interpret/resolve.
Platform: M1 Pro with Monterey (12.4) If anyone has an idea where this might come from, any help is greatly appreciated. |
Try adding this line at the bottom of : https://github.com/tensorflow/text/blob/master/third_party/sentencepiece/BUILD
|
Thanks you very much for trying to solve this issue! However, neither adding the dependency, nor deleting the entire I also observed the same error for absl/strings, which was obscured by mostly failing on the darts_clone module before reaching the other error. If I compile multiple times, either one of those errors appear. here is the other error message: P.S. |
Are you compiling using the most recent commit of branch 2.9? The most recent commit changes configure.sh to download the correct version of .bazelrc and .bazelversion from TF. For 2.9, this is bazel version 5.0.0 and not 5.1.1. The .bazelrc file may have differences as well. |
@broken Isn't the version of |
@raemisch I use |
(I can't compile master or the tag v2.9.0) |
Yes, but for the version TF used on that branch. TF 2.9 uses 5.0.0 - https://github.com/tensorflow/tensorflow/blob/r2.9/.bazelversion We specify those versions in our branched configure.sh now too - https://github.com/tensorflow/text/blob/2.9/oss_scripts/configure.sh#L64 If you are able to compile fine on 5.1.1 it's not that issue then. It was somewhat a shot in the dark since they were hitting the issue and nobody else. Looking at this more, the build does seem incomplete. I think the added dep still needs to happen, and then the sp.patch should rewrite those imports to "include/darts.h" instead of third_party. I'll work on a PR for that today. |
I believe this should fix it. #972 |
This change has now been cherry-picked into branch 2.9 |
as I said in the PR..., I still get errors related to absl with the change. This is latest master...
|
(The darts error is gone though!) |
It's difficult for me to debug completely when I'm not receiving the error. Though, the dependencies do look legitimately missing in these cases. edit: The branch is now updated with str_format dependency change. |
I was able to build and install tensorflow_text==2.9 from the source, just following the instruction in the github introduction. I am using python 3.10.5 on macbook M1 with
|
Symbol errors like that most often occur when running TF Text with a version of TF it wasn't built with. Which intro instructions did you look at? Can you follow the ones by sun1638650145 here. |
I have fixed the issue following the @sun1638650145 tutorial. Bascially TF's minor version has to match to TF text's minor version, like cannot use 2.9.2 TF with 2.9.0 TF text |
That shouldn't be the case, but there are some fixes that happened later on the 2.9 branch to make it easier to build iirc. I'm glad you got it working. |
So, we now have tensorflow-macos 2.10.0. Speculation: This is not a symbol not found, so though a discrepancy between symbols of tensorflow and tensorflow-macos is possible in theory, I doubt this is what's happening here. It seems there is an error in parsing the resulting library structure, though |
Those symbol errors happen when a compiled binary calls out to a library, but the ABI of that library does not have the symbol in its symbol table. The symbol table can change by using a different compiler, version of the compiler, or settings for the compiler. It is unlikely there is problem reading the structure, it is most likely that the symbol doesn't exist. You can confirm this with I would recommend looking at sun's tutorial and making sure that you didn't miss any steps, because if you built tensorflow_text and are getting symbol errors, perhaps the wrong version of TF is in the bazel workspace file and you are building against a different shared TF lib than you expect. |
Well, there is the discrepancy that tensorflow_text uses tensorflow 2.10.0 and not tensorflow_macos 2.10.0, which we do not have the source of.
I should have been more explicit than pointing to the gist: the important line is
The symbol not found seems to be due to not being able to understand the library structure at all, from my reading of this line. But thank you for confirming that compiler version might indeed be an issue. |
@maparent I also found the same problem, all Python versions are like this, |
But doesn't using tensorflow (non-macos) preclude using tensorflow-metal? Possible it's the best we can do now, of course. |
That fixed it! Thank you so much!
…On Thu, Jul 28, 2022 at 12:51 PM Robert Neale ***@***.***> wrote:
It's difficult for me to debug completely when I'm not receiving the
error. Though, the dependencies do look legitimately missing in these cases.
Here is the next update. You can patch it in now to see if it is fixed for
you, or wait for me to run it through all of our testing and get it added:
https://github.com/tensorflow/text/pull/973/files
—
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACLIOQJS5D6JIY75E2C7LVWLQCHANCNFSM5NJ6RE3Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I've been trying to build tf text following sun's https://github.com/sun1638650145/Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon/blob/369f0c8a7801f9fa0887de1dfb40e12718e6c02a/tutorials/text/text.md but I'm running into a darts.h error similar to the one reported above:
I'm running on Monterey 12.6.1 macbook pro with an m1 chip. Sun's tutorial says to use bazel 5.1.1. but when I ran the build script I got a message asking to use 5.3 instead so I switched it, now I get this. Modifying third_party/sentencepiece/BUILD with the "@darts_clone" addition didn't work. Any help is appreciated. |
That import should be "include/darts.h". We have a patch file that runs and updates the include when including the Sentencepiece library. See: The patch file is set here: I'm not sure why it didn't run for you, but I would start looking there - determine why Bazel is not applying the patch. |
I checked and the patch file differs in the version of text that I was using (which is https://github.com/tensorflow/text/archive/refs/tags/v2.9.0.zip). I then tried again with the 2.9 branch which does include the right version of sp.patch but I got other errors. This lead me to try several branches and actually the build succeeded with version 2.10! Many thanks for your help! To anyone reading that ended up here from suns tutorial, here's what I did to make it work:
|
So still no prebuilt version for MacOs? Maybe there is straight forward instruction how to do this? |
where can we subscribe to at least a beta release? % pip3 install rasa[metal] |
There are instructions here: #1077 (comment) Outside of setting up the environment, it is mostly run_build.sh. If this works for you too, we can add the additional environment settings to the README. |
same problem with Python 3.12.4 on my fedora on intel lenovo |
I am using macOS version Monterey on my MI Air and for some reasons I can't install tensorflow text even though I installed tensorflow. When I run
pip3 install tensorflow_text
on terminal it says:I have also tried using
pip3 install tensorflow-text
but the result is same. Is there any other way I can install this? Please help as I am very new to python. Regards.The text was updated successfully, but these errors were encountered: