How to solve com_error when trying to connect to Ansys AnsoftHfss.HfssScriptInterface through win32com.client? - win32com

I am trying to test connecting to Ansys AnsoftHfss.HfssScriptInterface through win32com.client. Code is as below.
import win32com.client
print(win32com.client.Dispatch('AnsoftHfss.HfssScriptInterface'))
However, I am getting an error => com_error: (-2147221005, 'Invalid class string', None, None).
I have installed and opened the paid version (Academic Research Licence) of Ansys Electronic Desktop 2021.r2.
I have installed the Ansys Electronic Desktop in Windows 11 through Parallels virtual machine in my M1 Pro Mac. More details as below:
Processor: Apple Silicon 3.20 GHz (4 processors), Installed RAM: 8.00 GB, System type: 64-bit operating system, ARM-based processor
I'm not sure whether this could be related to the issue above. When I installed the software, there was an error when the installer was configuring the machine as below. I tried running as the installer as administrator and the the issue still occurred.
[UPDATE 19/12/2022]
I investigated further. I listed all the ProgID in my computer using the PowerShell function Get-ProgID (PowerShell Gallery | Get-ProgID.ps1 1.0.1). I can find the following ProgID for Ansys.
ProgID => Location
SIwave.Application =>
C:\Program Files\AnsysEM\AnsysEM21.2\Win64\siwave.exe
Simplorer2021.2.Simulator =>
C:\Program Files\AnsysEM\AnsysEM21.2\Win64\Sim2000.dll
SIwave.Document =>
C:\Program Files\AnsysEM\AnsysEM21.2\Win64\siwave.exe
Simplorer2021.2.CompilerScript =>
C:\Program Files\AnsysEM\AnsysEM21.2\Win64\SimplorerCompEngine.dll
I don’t see AnsoftHfss.HfssScriptInterface in the list.
I tested the code below:
import win32com.client
win32com.client.Dispatch("SIwave.Application")
And I successfully get back <COMObject SIwave.Application> as output. No errors.
I am not sure why AnsoftHfss.HfssScriptInterface is not in the list.

The issue was happening because I had installed C++ Redistributables 2015-2022 before running the installer. Uninstalling all C++ Redistibutables and running the Ansys installer which installs it's own C++ Redistributables fixed the issue.

Related

React-Native installation on Windows 11 machine

I'm trying to get React Native installed on a Windows 11 virtual machine.
I keep getting Intel® HAXM installation failed. To install Intel® HAXM follow the instructions found at: https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows
I've tried installing Intel Haxm manually but I get
As this is a virtual machine I'm unable to access the bios to enable virtualization, so I've been following https://learn.microsoft.com/en-us/windows-365/enterprise/nested-virtualization
Set up a WSL development environment.
Windows Subsystem for Android™️.
Install Hyper-V on Windows 10.
From the document linked above, I've tried all of them, restarted the machine and still I get the above error.
Can someone recommend any steps I may have missed to get Intel Haxm installed?
My virtual machine specs

IBM MobileFirst Platform Installation in Windows 8.1 64Bit

I am using my office laptop (Lenovo vV310 - 8GB RAM - 64 Bit OS - Windows 8.1). I have been trying to fix an installation issue with IBM Mobile First Platform for the past few days. I downloaded the IBM Mobile First Developer Kit from link http://public.dhe.ibm.com/ibmdl/export/pub/software/products/en/MobileFirstPlatform/mobilefirst-deved-devkit-windows-8.0.0.0.exe
The problem is the installation software InstallAnywhere is not installing and gives the below warning.
Windows error 2 occured while loading the Java VM
I have JDK 1.8 installed in my notebook and I couldn't fix the issue. I have the java JDK and JRE bin paths set in the environment variables.
If any of you have fixed the issue, please share the solution.
Open command line as Administrator and type following command.
[path of mobilefirst-devkit.exe] LAX_VM ["path of java.exe"]
Usage
C:\Users\gaurab\Downloads\mobilefirst-deved-devkit-windows-8.0.0.0.exe LAX_VM "C:\Program Files\Java\jdk1.8.0_112\bin\java.exe"

How do install pyopencl using INDE instead of OpenCL SDK?

I'm a python newbie and I'm trying to install pyopencl. I've found Andreas Klöckner's website. And I'm trying to use the Windows 7 64bit, Python 2.7, Visual Studio 2010, Intel OpenCL SDK 1.5 directions to install. The problem is that Intel OpenCL SDK has been integrated into INDE. So I'm wondering what the equivalent library file is for C:\Program Files (x86)\Intel\OpenCL SDK\1.5\include and C:\Program Files (x86)\Intel\OpenCL SDK\1.5\lib\x64 ? After installing INDE, I didn't see anything under that specific file location.
Under C:\Intel\INDE, if I just look for folders that contain libraries I saw the code_builder_5.0.0.43 (contains OpenCL), IDEintegration (contains a bunch of stuff), the media_raw_accelerator_1.0.3, media_sdk_6.0.0.308. Anyone know which one I should be using?
It's 'C:\Intel\INDE\code_builder_5.0.0.43\include' and 'C:\Intel\INDE\code_builder_5.0.0.43\lib\x64'
Let me add a few points that could be useful to others who want to use PyOpenCL on Windows. First, if you are not a Python developer, you will want to use the Intel OpenCL Code Builder. When you install the INDE Suite, you integrate in Visual Studio and you get all the syntax highlighting amongst others. This video gives a great overview: http://bcove.me/xrcs5bze
The latest OpenCL 2.0 (as of time of writing) is now part of OpenCL Code Builder. In order to access the OpenCL framework to use with PyOpenCL, do the following installation on Windows (if not yet done):
Detailed instructions can be found here: http://wiki.tiker.net/PyOpenCL/Installation/Windows
Install Visual Studio
Install Python 2.7
Install NumPy
Install PyOpenCL
Install Intel INDE (OpenCL Code Builder component)
Once this is done, locate the siteconf.py file and edit accordingly. On my machine, I have INDE Update 2 which comes with OpenCL Code Builder 5.1.0.25 installed.
Thus, the following lines are edited:
CL_INC_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\include']
CL_LIB_DIR = [r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x64', r'C:\Intel\INDE\code_builder_5.1.0.25\lib\x86']
I hope that helped.

ValueError: Symbol table not found

I'm trying to install scikit-learn; following the instructions, I downloaded the source and attempted to install it with python setup.py install, however the installation is interrupted at:
File "C:\Users\Alpine\Anaconda\lib\site-packages\numpy\distutils\mingw32ccompi
ler.py", line 278, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found
I've also tried using easy_install -U scikit-learn, although end up with the same error.
Using conda install scikit-learn appeared to install the conda-3.4.1-py27_0.tar.bz2 and numpy-1.8.1-py27_0.tar.bz2 packages, and for safe measure I ran conda update anaconda, although I'm still receiving the same error.
Would anybody know how to work around this?
This solution will take care of "symbol table not found" error from numpy (or any other package ) on windows machine
sklearn people have provided good solution for this over here
http://scikit-learn.org/stable/developers/advanced_installation.html#building-on-windows
you can find instruction for Linux and mac on same page
now just follow these steps
32-bit Python
For 32-bit python it is possible use the standalone installers for microsoft visual c++ express 2008 for Python 2 or Microsoft Visual C++ Express 2010 for Python 3.
Once installed you should be able to build scikit-learn without any particular configuration by running the following command in the scikit-learn folder:
python setup.py install
64-bit Python
For the 64-bit architecture, you either need the full Visual Studio or the free Windows SDKs that can be downloaded from the links below.
The Windows SDKs include the MSVC compilers both for 32 and 64-bit architectures. They come as a GRMSDKX_EN_DVD.iso file that can be mounted as a new drive with a setup.exe installer in it.
**For Python 2 you need SDK v7.0: MS Windows SDK for Windows 7 and .NET Framework 3.5 SP1 -> https://www.microsoft.com/en-us/download/details.aspx?id=18950
For Python 3 you need SDK v7.1: MS Windows SDK for Windows 7 and .NET Framework 4** -> (can't post link as i need atleast 10 reputation point )
Both SDKs can be installed in parallel on the same host. To use the Windows SDKs, you need to setup the environment of a cmd console launched with the following flags (at least for SDK v7.0):
cmd /E:ON /V:ON /K
Then configure the build environment with:
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -q -version:v7.0
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release
after typing above commands in cmd as soon as you hit enter the window will be changed lil bit ( font color changed to green ) now go to directory where you have downloaded sklearn zip file from git hub then un-zip it
and go to directory where you can find setup.py
run command
python setup.py install
if it's not recognizing python then you migh have missed this command
cmd /E:ON /V:ON /K
so till now if u have done everything correct then your package will be installed without any difficulties

Unable to install JDK7u21x64 on Windows 8 x64

I have just upgraded to Windows 8 Pro, mostly because my Windows 7 license has reached maximum activations and I have a free copy of 8, and partially so I can ensure my software is 8-compatible.
I seem to be incapable of installing the JDK. I just downloaded it from the Oracle website (jdk-7u21-windows-x64.exe).
Windows reports itself as: 64-bit Operating System, x64-based processor.
When I try and run it, either normally or as administrator is shows up with the message:
This app can't run on your PC
To find a version for your PC, check with the software publisher
Does anyone have any ideas on this, a quick Google indicates it should just install same as usual.
While 8 still insistently refuses to install the JDK even after re-downloading and checking the hash, the Netbeans + JDK bundle does install which includes the JDK so that solves this issue sufficiently for now.
Update: The 64-bit version now works fine.
Try the x86 version: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html , I don't think there is a proper build for Windows 8 Pro.