Cannot run python script in Rstudio

I have a python script running well in notepad tool, but it doesn't work when I try to run it in Rstudio.

I'm appreciate if anyone could help with it.

---Below is error message.

clientsocket.close()

Error in clientsocket.close() :
could not find function "clientsocket.close"

reticulate::repl_python()

reticulate uses python 2.7 by default, so the libraries you use must be installed for python 2.7 or you have to specify the python version (or virtual environment) that you are using.

If that doesn't solve your problem, could you please prepare a reproducible example (reprex) illustrating your issue? A reprex makes it much easier for others to understand your issue and figure out how to help.

Thank you for prompt reply, python version is root cause of my problem.:smiley:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.