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 repr oducible ex ample (reprex) illustrating your issue? A reprex makes it much easier for others to understand your issue and figure out how to help.
Why reprex?
Getting unstuck is hard. Your first step here is usually to create a reprex, or reproducible example. The goal of a reprex is to package your code, and information about your problem so that others can run it and feel your pain. Then, hopefully, folks can more easily provide a solution.
What's in a Reproducible Example?
Parts of a reproducible example:
background information - Describe what you are trying to do. What have you already done?
complete set up - include any library() calls and data to reproduce your issue.
data for a reprex: Here's a discussion on setting up data for a reprex
make it run - include the minimal code required to reproduce your error on the data…
Thank you for prompt reply, python version is root cause of my problem.
system
Closed
June 10, 2019, 8:57am
5
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.