我正在使用reticulateR 包并想python3用它进行配置,但无法做到。我尝试了以下代码
library(reticulate)
packageVersion("reticulate")
# [1] ‘1.10.0.9002’
use_python(python = "/usr/bin/python", required = TRUE)
py_config()
# python: /usr/bin/python
# libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
# pythonhome: /usr:/usr
# version: 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
# numpy: /usr/lib/python2.7/dist-packages/numpy
# numpy_version: 1.13.3
#
# NOTE: Python version was forced by use_python function
Sys.which("python3")
# python3
# "/usr/bin/python3"
use_python(python = "/usr/bin/python3", required = TRUE)
py_config()
# python: /usr/bin/python
# libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
# pythonhome: /usr:/usr
# version: 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
# numpy: /usr/lib/python2.7/dist-packages/numpy
# numpy_version: 1.13.3
#
# NOTE: Python version was forced by use_python function
任何提示,请。
慕妹3242003
相关分类