Closed chewbecca-80 closed 5 years ago
Try downgrading python version to 3.6 and let me know if you still face the same error. Thanks!
HI! I originally tried everything with python 3.6 and it came back with the same errors.
@chewbecca-80 The issue might be that you might have installed tensorflow using conda and tf_sentencepiece using pip. This causes incompatibility.
Also please note that this issue is not related to tensorflow Hub. Its mainly related to google/sentencepiece. For further clarifications and to get fast response please post your issue here.
Unfortunately, that's not the issue. I originally installed tensorflow using pip by following the example given in the Universal Sentence Encoder Multilingual Colab notebook. When I installed it that way, I got an error when I tried to import tensorflow. But you're right, I should make this issue in sentencepiece. I just clicked the link in the USEML documentation and it brought me to here for reporting issues. Thanks!! :)
When trying to replicate the Universal Sentence Encoder Multilingual tool example (https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/cross_lingual_similarity_with_tf_hub_multilingual_universal_encoder.ipynb) in a conda and virtual environment, symbol errors arise when importing tf_sentencepiece. I have attached several conda environment yml files to this ticket, all of which produce the same error when importing tf_sentencepiece. use_ml_environments.zip
To reproduce the error:
conda env create -f filename
where filename is the name of file.conda activate environment-name
where environment-name is the name of the environment (you can see the environment name after creating it, or seeing a list of environments with the command "conda info --envs")python
import tensorflow as tf
import tf_sentencepiece