1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Can't import PyEpics on CentOS 7 |
From: | Matt Newville via Tech-talk <[email protected]> |
To: | Chiang, Liang-Chih [江良志] <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Wed, 8 Jan 2020 22:22:14 -0600 |
Hi,
I could install PyEpics on CentOS 6.10(x86_64) and Python 3.7,
and there is no problem using caget, caput, PV, Motor, etc.. of PyEpics.
However, in the following environment, 'import epics' will result in error.
CentOS version 7.4, x86_64 architecture
Linux kernel version 3.10.0
Python 3.7 (created by Miniconda virtual environment)
The PyEpics was installed by the following command:
$ conda install -c GSECARS pyepics
In Python interactive shell:
>>> import epics
Traceback (most recent call last):File "/home/user/miniconda3/envs/py37/lib/python3.7/ctypes/__init__.py", line 97, in CFUNCTYPEreturn _c_functype_cache[(restype, argtypes, flags)]KeyError: (None, (<class 'epics.dbr.access_rights_handler_args'>,), 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):File "<stdin>", line 1, in <module>File "/home/user/miniconda3/envs/py37/lib/python3.7/site-packages/epics/__init__.py", line 29, in <module>from . import caFile "/home/user/miniconda3/envs/py37/lib/python3.7/site-packages/epics/ca.py", line 761, in <module>dbr.access_rights_handler_args)File "/home/user/miniconda3/envs/py37/lib/python3.7/site-packages/epics/dbr.py", line 339, in make_callbackreturn ctypes.CFUNCTYPE(None, args)(func)File "/home/user/miniconda3/envs/py37/lib/python3.7/ctypes/__init__.py", line 99, in CFUNCTYPEclass CFunctionType(_CFuncPtr):TypeError: item 1 in _argtypes_ passes a struct/union with a bitfield by value, which is unsupported.
I also tried installing PyEpics by 'pip install pyepics', similar error message will show up when installing.
Best regards.
LiangChih Chiang
email: [email protected]
Beamline Group
National Synchrotron Radiation Research Center (NSRRC)