0
파이썬 스크립트를 호출하여 함수로 래핑 된 병렬 api 호출을 호출하려고합니다. 그러나 로컬 컴퓨터의 Rstudio에서 python 스크립트를 실행하거나 aws에서 R을 실행할 수 없습니다.aws 및 Rstudio에서 R에서 python 스크립트를 실행할 수 없습니다.
다음은 Python 용 코드입니다.
import sys
from numpy.random import randint
if len(sys.argv)==5:
ci = int(sys.argv[1])
cd = bool(sys.argv[2])
db = str(sys.argv[3])
fc = bool(sys.argv[4])
else:
ci = 296
cd = True
db = "snap_uat"
fc = False
if cd & fc:
print db
randit(ci)
R 코드는 다음과
cd <- function(ci, cd, db, fc){
ServiceLog <- system(
paste(
"ipython", "callpython.py",
ci,
cd, db,
fp, sep = " ")
, intern = TRUE
)
)
오류가 될 때 :
SH : 1 : ipython :
발견되지는 그것이 아니라고 나의 가정이다 anaconda에서 python을 호출하지만 inbuilt python. ipython이없는
EC2 인스턴스와 로컬 컴퓨터에 iPython이 설치되어 있습니까? – error2007s
예, 아나콘다 python2.7을 aws에 설치했습니다. –
파이썬 명령을 실행하려고 할 때 오류가 발생하여 np.random import randint에서 올바른 호출이 올 수 있습니까? – error2007s