hexagon logo

Anyone using the new Python modul Adams on Linux ?

... coz I'm getting this when trying to load it in a Linux shell with v2017.2:
 
mdi2017.2 -c python
 Python 2.7.11 (default, Jan 21 2016, 08:37:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Adams
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/scratch/builds/adams-ADAMS2017.1/obj/prod/release/python/linux64/lib/python2.7/site-packages//mdi/adamspy/Adams.py", line 8, in <module>
 File "/scratch/builds/adams-ADAMS2017.1/obj/prod/release/python/linux64/lib/python2.7/site-packages//mdi/adamspy/Libraries.py", line 22, in <module>
 File "/appl/mdi/2017.2_RH6/python/linux64/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
   return self._dlltype(name)
 File "/appl/mdi/2017.2_RH6/python/linux64/lib/python2.7/ctypes/__init__.py", line 365, in __init__
   self._handle = _dlopen(self._name, mode)
OSError: /appl/mdi/2017.2_RH6/linux64/libamd.so: undefined symbol: file_vi_edit
>>> dir(Adams)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
NameError: name 'Adams' is not defined
 
 
Funnily opening A/Car, using the command window, switching to py and typing "import Adams" worked fine.
 
 
Parents
  • Hi All,
    This never 'worked'. Here's why:
    • the 'Adams' module is *new* in v2017 and it is built upon Adams/View libraries and functionality. Because of this it only runs within Adams/View. You can't import import it on the command line in a 'standalone' shell and you never have been able to.
    • Perhaps Martin's comments relate to the old 'ADAMS' module that you could import from anywhere. Note the spelling. It's possible that that didn't have View dependencies and could be imported, but it's not the same thing as the new 'Adams' module that you want to be using.
     
    Regardless of the (blurred) details here: yes: we really want to be able to "import Adams" from both the 'View Python' shell AND the 'standalone Python' shell. But the first iteration of this new module is limited to running only in View (Car, etc.) now. That was a design decision that we had to make. It is not the long-term plan for this, so please excuse the trouble in the meantime and stick to the 'View Python' shell.
     
    One more thing: a future vision that makes a lot of sense is to have a 'View Python' shell that can be directly embedded within an IDE such as PyCharm. That would be the perfect solution, in my opinion. Suggestions for improvement as you use it are appreciated.
     
    Thanks,
    Kent
     
     
Reply
  • Hi All,
    This never 'worked'. Here's why:
    • the 'Adams' module is *new* in v2017 and it is built upon Adams/View libraries and functionality. Because of this it only runs within Adams/View. You can't import import it on the command line in a 'standalone' shell and you never have been able to.
    • Perhaps Martin's comments relate to the old 'ADAMS' module that you could import from anywhere. Note the spelling. It's possible that that didn't have View dependencies and could be imported, but it's not the same thing as the new 'Adams' module that you want to be using.
     
    Regardless of the (blurred) details here: yes: we really want to be able to "import Adams" from both the 'View Python' shell AND the 'standalone Python' shell. But the first iteration of this new module is limited to running only in View (Car, etc.) now. That was a design decision that we had to make. It is not the long-term plan for this, so please excuse the trouble in the meantime and stick to the 'View Python' shell.
     
    One more thing: a future vision that makes a lot of sense is to have a 'View Python' shell that can be directly embedded within an IDE such as PyCharm. That would be the perfect solution, in my opinion. Suggestions for improvement as you use it are appreciated.
     
    Thanks,
    Kent
     
     
Children
No Data