BenWiseman / sentiment.ai

Package for using deep learning models (from tf hub) for easy sentiment analysis
MIT License
46 stars 5 forks source link

different python version with macOS Monterey #16

Open BenWiseman opened 2 years ago

BenWiseman commented 2 years ago

Discussed in https://github.com/BenWiseman/sentiment.ai/discussions/15

Originally posted by **salvadorrdm** September 18, 2022 Hi, congratulations for the package. I am trying to use it but get a crash in RStudio. According to this https://stackoverflow.com/questions/71577626/issues-installing-python-3-8-10-on-macos-12-3-monterey, I had to install Python 3.8.13 as I am using macOS Monterey in a Mac with M1. Then, I run library(sentiment.ai) install_sentiment.ai(python_version = "3.8.13") And everthing is fine. Then, I go to tools > global options > python > python interpreter and set the default interpreter as the new one I see: ~/.pyenv/versions/3.8.13/bin/python But when I run init_sentiment.ai() I see this in the console > Attempting to activate virtualenv environment... > Preparing Model > > Using virtual environment '/Users/salvruiz/.virtualenvs/r-sentiment-ai' ... > + '/Users/salvruiz/.virtualenvs/r-sentiment-ai/bin/python' -m pip install --upgrade --no-user 'tensorflow_hub' > Requirement already satisfied: tensorflow_hub in ./.virtualenvs/r-sentiment-ai/lib/python3.8/site-packages (0.12.0) > Requirement already satisfied: protobuf>=3.8.0 in ./.virtualenvs/r-sentiment-ai/lib/python3.8/site-packages (from tensorflow_hub) (3.19.5) > Requirement already satisfied: numpy>=1.12.0 in ./.virtualenvs/r-sentiment-ai/lib/python3.8/site-packages (from tensorflow_hub) (1.19.5) > Done! And immediately I got the picture of the bomb and the message: R session aborted etc. I've seen in the Reference manual that it is necessary to use Python 3.8.10 but this doesn't work in Monterey Could anyone help? thanks a lot
lexkel commented 1 year ago

As the original post, rstudio is crashing at the init_sentiment_ai() call.

Python version: 3.8.13

sessInfo():

R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Ventura 13.2.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.2.1 tools_4.2.1