-
Notifications
You must be signed in to change notification settings - Fork 1
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: unexpected symbol in "args <- paste("-m venv", my_env) gensim" #1
Comments
Sorry the package is not really maintained currently, I hope to develop it further soon. I have corrected the instructions in the README. my_env <- "./env"
# run this (works on unix)
args <- paste("-m venv", my_env)
system2("python3", args) # create environment
reticulate::use_virtualenv(my_env) # force reticulate to use env
# install textblob in environment
textblob::install_textblob(my_env) Does the above work? |
Dear John,
Thank you very much for sending this code.
Also, thank you for your work on the package!
Indeed, now I can run it properly.
Unfortunately, I am seeing the following error at the last step, installing :
Error in conda_python(envname = envname, conda = conda) :
no conda environment exists at path
I imagine this is on my side;but not sure how to solve it. Would you have a tip?
If I open the folder I specified as my_env, I do see a “conda-meta” folder with a history file.
Thanks
Ana Macanovic | PhD Candidate | Department of Sociology/ICS | Universiteit Utrecht | Padualaan 14, 3584 CH Utrecht | Room C2.24 | (030) 253 19 64 | [email protected]<mailto:[email protected]> | http://www.uu.nl/staff/AMacanovic
From: John (JP) Coene <[email protected]>
Sent: 21 November 2019 12:16
To: news-r/textblob <[email protected]>
Cc: Macanovic, A. (Ana) <[email protected]>; Author <[email protected]>
Subject: Re: [news-r/textblob] Error: unexpected symbol in "args <- paste("-m venv", my_env) gensim" (#1)
Sorry the package is not really maintained currently, I hope to develop it further soon.
I have corrected the instructions in the README.
my_env <- "./env"
# run this (works on unix)
args <- paste("-m venv", my_env)
system2("python3", args) # create environment
reticulate::use_virtualenv(my_env) # force reticulate to use env
# install textblob in environment
textblob::install_textblob(my_env)
Does the above work?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1?email_source=notifications&email_token=ANX5W7OEKS2TYILUDSY65NLQUZUYDA5CNFSM4JQAVNO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEZ346Q#issuecomment-557039226>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANX5W7M2BLAUVTHJ7XTOMQ3QUZUYDANCNFSM4JQAVNOQ>.
|
Funny this happens, I'm not sure why. The virtual environment is actually recommended but not necessary. Installing straight should work. Would you mind trying? textblob::install_textblob() Also, have you had any such issues with other python/reticulate packages? |
Indeed strange!
Running it works, but I think it’s struggling to find the right python version?
[cid:[email protected]]
Trying py-config, I see it also looks for it in files where I previously tried to specify a venv.
Wasn’t sure if I managed to load it still, so I tried download_corpora() and got this:
Error in py_initialize(config$python, config$libpython, config$pythonhome, :
Py_CompileString - The specified procedure could not be found.
I do find two python versions on my machine;
[cid:[email protected]]
And the 3.8 version I installed with conda:
[cid:[email protected]]
But if this is on my side, I’ll try to see what I can do. I was just not very clear as to what the package needs to function properly.
If you see from this what’s going wrong, can you please point me into the right direction?
I have not really used reticulate for other projects yet. Perhaps would face an issue with it as well, looking at these messages.
Thanks a lot for your help!
Ana Macanovic | PhD Candidate | Department of Sociology/ICS | Universiteit Utrecht | Padualaan 14, 3584 CH Utrecht | Room C2.24 | (030) 253 19 64 | [email protected]<mailto:[email protected]> | http://www.uu.nl/staff/AMacanovic
From: John (JP) Coene <[email protected]>
Sent: 21 November 2019 14:05
To: news-r/textblob <[email protected]>
Cc: Macanovic, A. (Ana) <[email protected]>; Author <[email protected]>
Subject: Re: [news-r/textblob] Error: unexpected symbol in "args <- paste("-m venv", my_env) gensim" (#1)
Funny this happens, I'm not sure why. The virtual environment is actually recommended but not necessary. Installing straight should work. Would you mind trying?
textblob::install_textblob()
Also, have you had any such issues with other python/reticulate packages?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1?email_source=notifications&email_token=ANX5W7MJWOSC46YFOH3EF5DQU2BPDA5CNFSM4JQAVNO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2EZ3Y#issuecomment-557075695>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANX5W7KKULFZ3JWXKYZ7NALQU2BPDANCNFSM4JQAVNOQ>.
|
I'm afraid I'm unsure what the issue but just so you know reticulate has been difficult for me to fully understand too. One thing that helped on my side was to find the path to the python installation, in R with reticulate::use_python("/usr/local/bin/python")
library(textblob) Then again, I wouldn't want to waste your time. textblob is really not properly integrated in this package and so might not be worth the trouble. |
Any luck? |
Dear John, Very sorry for the lack of updates! Got a bit busy with some other projects. I have cleaned up my python installations and tried again. Which I find strange, because if I try to go into this environment manually and install textblob with a python command, I get the message that it is already installed. Sorry to bother you again, but any ideas what might be going wrong here? |
An update; I have, in fact, managed to get it running! However, I am struggling to understand how could I import, for example, as CSV file with multiple documents into textblob. I assumed using apply function could help, but not very clear how to do this in R. If I try a simple Not sure how to get around this in R? Thank you! |
Hello all,
When running the code specified, I am getting the following error message
Error: unexpected symbol in "args <- paste("-m venv", my_env) gensim"
I am very good with reticulate yet, so I'd appreciate any help!
Thank you very much!
The text was updated successfully, but these errors were encountered: