Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: Question about the module named caffi.ca
From: lzf neu <lzfneu@live.com>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Sat, 21 Oct 2017 11:44:28 +0000

Hi,


I use pyinstaller to compile the python script to exe file in centos7 system that contained the following line :

from CaChannel import ca, CaChannel


When executing the exe file and an error occured :


[user@localhost dist]$ ./1-ok
/tmp/_MEIxRN9gA/CaChannel/ca.py:13: RuntimeWarning: c extension is not available, trying caffi as fallback
Traceback (most recent call last):
  File "1-ok.py", line 4, in <module>
  File "/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "CaChannel/__init__.py", line 3, in <module>
  File "/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "CaChannel/CaChannel.py", line 15, in <module>
  File "/usr/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
    exec(bytecode, module.__dict__)
  File "CaChannel/ca.py", line 14, in <module>
ImportError: No module named caffi.ca
[26510] Failed to execute script 1-ok


It seems I have to enter the absoult path of caffi.ca when using pyinstaller.


I have installed the cachannel by using the command:

sudo easy_install cachannel


I have no idea what the path of caffi.ca is under centos7 system or other methods to solve the problem.


Any help will be appreciated and thanks in advance!


Zhefu




Replies:
Re: Question about the module named caffi.ca Wang Xiaoqiang

Navigate by Date:
Prev: Re: s7plc more than one 240-byte PDU Zimoch Dirk (PSI)
Next: Online EPICS training Stephen Molloy
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
Navigate by Thread:
Prev: Re: s7plc more than one 240-byte PDU Maurizio Montis
Next: Re: Question about the module named caffi.ca Wang Xiaoqiang
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
ANJ, 23 Oct 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·