I am using Eviews 13.
I am trying to access Eviews Application from python code using both the below methods
import win32com.client
eviews_mgr = win32com.client.Dispatch("EViews.Manager.13")
eviews_app = eviews_mgr.GetApplication()
eviews_app.show()
import py2eviews as pv
eviewsapp = pv.GetEViewsApp(version='EViews.Manager.13', instance='new', showwindow=True)
pv.Run(" wfopen " + FOLDER_PATH + file_path, app=eviewsapp)
It is working fine in my system.
But when i created the exe and shared code with the client , there are getting error as ""EViews.Manager.13" not found.
Though the client have licensed Eviews 13 installed.
we checked the 'regcomponents" command, It shows all components as "Registered".
Even python libraries are installed.
We even checked Registry Editor that "HKEY_CLASSES_ROOT\EViews.Manager" is there. and current version is "EViews.Manager.13"
Could you please help what could be the possible issue that we are not able to open Eviews Application in client machine with same code.
Error while trying to access Eviews Application in Python
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Error while trying to access Eviews Application in Python
Let me throw out things to check (some of them obvious) as I can't think of anything else...
For the user having problems, do they have EViews installed and running locally? It's not running under App-V or some other application container package (e.g. Citrix)? Containerized apps can't be used via COM in the same way as a local app. Also, using an app that's installed somewhere on the network via COM also requires additional security settings in their registry so I would avoid this as well.
Is their Python running as 64-bit? This isn't strictly required, but since EViews itself is 64-bit now, using 64-bit Python would not force Windows to rely on Distributed COM.
Are they running the same Python version as you? If not, have them try the same version.
Are you seeing the error from your win32com.client.Dispatch line or from py.GetEViewsApp? Our py2eviews package uses the comtypes package to call CreateObject, which is different from win32com. I believe we ran into problems with win32com not being compatible with newer versions of python so we stopped using it within Py2EViews.
Since you already ran REGCOMPONENTS, you don't have to specify the ".13" version in the prog id. The current version is already EViews.Manager.13, so just call GetEViewsApp with "EViews.Manager" to see if that makes any difference.
Finally, if the user is using Python from an Anaconda package, try doing this in a brand new conda environment with just the packages you need to run your program. This can resolve any strange conflicting issues with other packages or altered environment settings.
Steve
For the user having problems, do they have EViews installed and running locally? It's not running under App-V or some other application container package (e.g. Citrix)? Containerized apps can't be used via COM in the same way as a local app. Also, using an app that's installed somewhere on the network via COM also requires additional security settings in their registry so I would avoid this as well.
Is their Python running as 64-bit? This isn't strictly required, but since EViews itself is 64-bit now, using 64-bit Python would not force Windows to rely on Distributed COM.
Are they running the same Python version as you? If not, have them try the same version.
Are you seeing the error from your win32com.client.Dispatch line or from py.GetEViewsApp? Our py2eviews package uses the comtypes package to call CreateObject, which is different from win32com. I believe we ran into problems with win32com not being compatible with newer versions of python so we stopped using it within Py2EViews.
Since you already ran REGCOMPONENTS, you don't have to specify the ".13" version in the prog id. The current version is already EViews.Manager.13, so just call GetEViewsApp with "EViews.Manager" to see if that makes any difference.
Finally, if the user is using Python from an Anaconda package, try doing this in a brand new conda environment with just the packages you need to run your program. This can resolve any strange conflicting issues with other packages or altered environment settings.
Steve
Who is online
Users browsing this forum: No registered users and 1 guest
