Я пытаюсь использовать следующий код:
sas = saspy.SASsession(cfgname='ssh', resutls='html',cfgfile='/Users/saumya.rb/opt/anaconda3/lib/python3.7/site-packages/saspy/sascfg.py')
ошибка:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/saumya.rb/opt/anaconda3/lib/python3.7/site-packages/saspy/sasbase.py", line 415, in __init__
self.sascfg = SASconfig(**kwargs)
File "/Users/saumya.rb/opt/anaconda3/lib/python3.7/site-packages/saspy/sasbase.py", line 130, in __init__
SAScfg = self._find_config(cfg_override=kwargs.get('cfgfile'))
File "/Users/saumya.rb/opt/anaconda3/lib/python3.7/site-packages/saspy/sasbase.py", line 267, in _find_config
SAScfg = importlib.import_module(tempname)
File "/Users/saumya.rb/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/folders/pr/w_hplw1j7bl0vj2yj97_dd5mv3j_2t/T/tmp1bi7td8v/sascfg005.py", line 88
'ssh' : '/usr/bin/ssh',
^
SyntaxError: invalid syntax
Пожалуйста, поделитесь подробностями, например, какую python версию мне следует использовать. как должен выглядеть мой sascfg.py
Я использую Python 3.7.4 (по умолчанию, 13 августа 2019, 15:17:50) [Clang 4.0.1 (tags / RELEASE_401 / final)] :: Анаконда, В c. Дарвин
using below config :
default = {'saspath' : '/sashome/compute/SASFoundation/9.4/sas'
'ssh' : '/usr/bin/ssh',
'options' : ["-fullstimer", "-autoexec", "/SAS9.4/SASConfig_bkp/compute/Lev1/SASApp/StoredProcessServer/autoexec.sas"],
'autoexec' : "libname mylib '/ngs/app/sasp';",
'host' : 'remote.linux.host',
'options' : ["-fullstimer"]
}
#ssh = {'saspath' : '/opt/sasinside/SASHome/SASFoundation/9.4/bin/sas_en',
# 'ssh' : '/usr/bin/ssh',
# 'host' : 'remote.linux.host',
# 'encoding': 'latin1',
# 'options' : ["-fullstimer"]
# }
#
ssh = {'saspath' : '/sashome/compute/SASFoundation/9.4/sas'
'ssh' : '/usr/bin/ssh',
'options' : ["-fullstimer", "-autoexec", "/ngs/app/sasp/SAS9.4/SASConfig_bkp/compute/Lev1/SASApp/StoredProcessServer/autoexec.sas"],
'autoexec' : "libname mylib '/ngs/app/sasp';",
'host' : 'remote.linux.host',
'options' : ["-fullstimer"]
}