Replies: 20 comments 2 replies
-
May I asked why you try to build? Compling/building on Windows is a major PITA... |
Beta Was this translation helpful? Give feedback.
-
Hello, I already performed the "Install Pre-build Modules" section, perhaps that is sufficient? Thanks |
Beta Was this translation helpful? Give feedback.
-
The first question still stands- why build from source? Use the pre-built windows version, then you don't have to do that step. 10x easier. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I don't know what I'm doing so I was doing my best to follow the instructions at the site I referenced above. |
Beta Was this translation helpful? Give feedback.
-
When there's a choice, you should only do the pre-build sections, not the
"build from source" ones.
I think you should follow the instructions from here:
Installing Ready-Made Packages — openEMS 0.0.35 documentation
<https://docs.openems.de/install/package.html#windows>
You can either use the Matlab/Octave interface or the Python one. I'm a
little more familiar with Python so I was going to go that route, but the
Wiki tutorial with the detailed comments all use the Matlab/Octave
interface, so you might want to use that one instead. They are similar,
just the openEMS command syntax is a little different between the Python
and Matlab/Octave interfaces.
It is hard to tell sometimes which sections you can skip over and which
need to be done. In the link above, there is one part that's a little
confusing- IF you want to use the Python interface.
[image: image.png]
I don't think you need to do the download/install step if you're going to
use the Python interface, because the "Python Interface Install" page says
that you need to download and install a different openEMS file, so there's
no point in downloading/installing the file this first page references.
The Python Install page also makes it easy to skip over a step you need to
do- the "Python Interface Install" link above takes you right to the
Windows install of the openEMS file which is in the middle of a page, but
at the top of that page there's a few Python modules that need to be
imported with 'pip', so don't miss that step.
So, if you do want to use the Python interface, I think this is the right
procedure.
1) Install python 3.10 or 3.11
2) From the link above, skip the first download and go to the "Python
Interface Install" page, scroll to the top and install the python modules:
pip install numpy h5py matplotlib
3) Scroll down to the 'Windows' section and follow the link for openEMS_win
4) Find the latest version with 'msvc' in the filename, currently that's
the second section labeled "v0.0.36 RC-2 (MSVC) Latest"
5) Open the "Assets" group and download the openEMS...msvc.zip file.
6) Unzip it and install.
7) Back on the python install page, in the Windows, "Install Pre-build
Modules" section, follow those instructions- cd etc., pip install, pip
install.
Then I think you're done and you can do the "Check Installation" step from
the very first page to make sure it all works.
If you're only going to use the Octave/Matlab interface, you should be able
to just follow the instructions directly, after getting Matlab or Octave
installed.
tom
…On Sun, Aug 4, 2024 at 6:52 PM WidderGit ***@***.***> wrote:
Yeah, I don't know what I'm doing so I was doing my best to follow the
instructions at the site I referenced above.
Since is looks like I successfully installed with the prebuild modules
then do I just skip to the Setup section:
setx OPENEMS_INSTALL_PATH C:\opt\openEMS
Or can I just skip this step as well?
Thanks
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMCT6L42TD4GW2HYUWTZP3EGNAVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRTG43TSMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Tom, |
Beta Was this translation helpful? Give feedback.
-
Tom, |
Beta Was this translation helpful? Give feedback.
-
On my at least the app is called AppCSXCAD.
Does the version of Python you're using match the filename of the whl you
use? For instance, CSXCAD-0.6.3-cp311-cp311-win_amd64 would use Python
3.11.
…On Tue, Aug 6, 2024 at 7:01 PM WidderGit ***@***.***> wrote:
Tom,
I followed the steps, and everything went as it was supposed to including
an indication of successful openEMS installation. When I attempt to run the
"simple_patch_antenna.py" tutorial from Visual Studio Code I get several
warnings and one error "ModuleNotFoundError: No module named 'CSXCAD'". As
far as I can tell the .whl pip install for CSXCAD went how it was supposed
to, but I don't see a physical copy of CXSCAD anywhere. It appears I am
missing yet another step in the installation.
I attempted to run the tutorial via python started at a CMD window, this
didn't work either.
Any advice on this one?
Thanks,
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMDIKUVHCOIY3IEVSBLZQFWYBAVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRVHA4TQOA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
You say you tried to run from Visual Studio, what I did for python files
is, in the command window, I'd type 'py Simple_Patch_Antenna.py". 'py' was
a alias that was made when python was installed.
…On Tue, Aug 6, 2024 at 7:01 PM WidderGit ***@***.***> wrote:
Tom,
I followed the steps, and everything went as it was supposed to including
an indication of successful openEMS installation. When I attempt to run the
"simple_patch_antenna.py" tutorial from Visual Studio Code I get several
warnings and one error "ModuleNotFoundError: No module named 'CSXCAD'". As
far as I can tell the .whl pip install for CSXCAD went how it was supposed
to, but I don't see a physical copy of CXSCAD anywhere. It appears I am
missing yet another step in the installation.
I attempted to run the tutorial via python started at a CMD window, this
didn't work either.
Any advice on this one?
Thanks,
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMDIKUVHCOIY3IEVSBLZQFWYBAVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRVHA4TQOA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I have followed all the steps and still get: When I search, the answer (from thielbig) just says follow the installation instructions (which I have done). Note that I have not attempted to build modules from source recently as at first, I could not get this to work and I was advised not to use that method (see input from thleibig above). I'm missing a step somewhere for installing CSXCAD. Stuck Thanks for trying to help |
Beta Was this translation helpful? Give feedback.
-
Here's the top of my openems directory-
[image: image.png]
I assume you have openEMS.exe in it, and maybe AppCSXCAD.exe as well, but
you're missing CSXCAD.dll? And you should have the python directory but
not the matlab one since you can't use it (you know that Octave is free
right?). And there's a bunch of files that start with vtk in this top
directory too.
Then in my python directory, I have:
[image: image.png]
Then in Tutorials is:
[image: image.png]
A couple of those files are ones I made trying to make my own simulation
work, the others you should have too.
It's from this directory that I would start an openEMS sim like this:
[image: image.png]
You wouldn't see the output about the substrate and ports, I was trying to
understand how the simulation is set.
This is the point where you get the DLL load failure for CSXCAD?
It sounds like python is working for you- if you just type 'py' in the
command line, does it put you in a python session like this-
[image: image.png]
You can exit it using ctrl-z.
If it's just the '.dll file that's missing I can go through the install and
find out when it shows up for me, maybe that'll tell us what step you're
missing.
…On Wed, Aug 7, 2024 at 6:25 PM WidderGit ***@***.***> wrote:
Unfortunately, I have followed all the steps and still get:
ImportError: DLL load failed while importing CSXCAD: The specified module
could not be found.
When I search, the answer (from thielbig) just says follow the
installation instructions (which I have done). Note that I have not
attempted to build modules from source recently as at first, I could not
get this to work and I was advised not to use that method (see input from
thleibig above). I'm missing a step somewhere for installing CSXCAD. Stuck
Thanks for trying to help
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMDMKVISDCYCDVSFXYTZQK3H7AVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRWHE2TGOA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I am having an issue seeing the pictures you posted. Thanks for your time, and sorry about not being able to see the pictures you posted |
Beta Was this translation helpful? Give feedback.
-
You're running python from the right place. And you have the right files in
the top directory. The python version you have installed matches the CSXCAD
& openEMS wheel versions?
I think the next step is to find out which import command causes the error.
Go into python, and then do the same commands that are in the .py file, in
the same order.
I thought the problem was the CSXCAD.dll file, but you have that so it's
something else- I'm betting it's the 'from CSXCAD import
ContinuousStructure' line.
…On Thu, Aug 8, 2024 at 3:31 AM WidderGit ***@***.***> wrote:
Unfortunately, I am having an issue seeing the pictures you posted.
Here is the main portion of the path for my installation of openEMS:
C:\openEMS_v0.0.36\openEMS
At the root of this path I have a bunch of files including AppCSXCAD.exe,
openEMS.exe and CSXCAD.dll.
The path I am running python from is
C:\openEMS_v0.0.36\openEMS\python\Tutorials
This is where the Simple_Patch_Antenna.py file is located
Perhaps I am running Python at the wrong location or there is some sort of
path environment variable missing?
Thanks for your time, and sorry about not being able to see the pictures
you posted
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMDOHQPCEK5IAQKJLS3ZQM3GVAVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRXGM2DOMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I believe the Python installation I am running matches, here are the whl's I installed: Here is the version of Python I am running: Which I thought was Version 3.11 (update 9?) In the previous entry I only provided the last line: here is the entire attempt to run the py file: C:\openEMS_v0.0.36\openEMS\python\Tutorials>python simple_patch_antenna.py This is the extent of what I know about the error so sorry if I mentioned something that was confusing. One potential complication is the instructions confused me as I interpreted them as needing to install prebuild modules and then install modules from source (not pick one or the other). I am worried that my attempts at the latter may have somehow messed things up. Thanks |
Beta Was this translation helpful? Give feedback.
-
Your python version matches the two wheel files so that's correct.
I'd try option 'C' first.
A. It is possible that installing from source then trying the prebuild
versions is causing a problem, you could try deleting the whole
opemEMS_v0.0.36 directory tree and start over. As you've seen it's less
than 10 steps, sometimes with some waiting between steps.
B. I don't remember why, but I have python 3.10.xx installed, it might be
because 3.11.xx gave me issues, you could try that too if wiping out the
openEMS tree doesn't work. I think this one takes longer because you'll
need to remove your current python and install 3.10.xx, then add all of the
python modules with pip.
C. I was able to install the openEMS version without the python interface
in just 5 steps- you can still run using the .py files, but it doesn't open
CSXCAD, it just goes directly to running openems. That's the version
without the msvc in the label-
This is pretty straightforward:
1. Download
https://github.com/thliebig/openEMS-Project/releases/download/v0.0.36/openEMS_v0.0.36.zip
2. Optionally move it from the downloads folder to where you want it
3. Unzip
4. CD into the python/Tutorials directory
5. Run one of the .py files like you've been doing-
python MSL_NotchFilter.py
…On Thu, Aug 8, 2024 at 3:36 PM WidderGit ***@***.***> wrote:
I believe the Python installation I am running matches, here are the whl's
I installed:
CSXCAD-0.6.3-cp311-cp311-win_amd64.whl
openEMS-0.0.36-cp311-cp311-win_amd64.whl
Here is the version of Python I am running:
C:\openEMS_v0.0.36\openEMS\python>python --version
Python 3.11.9
Which I thought was Version 3.11 (update 9?)
In the previous entry I only provided the last line: here is the entire
attempt to run the py file:
C:\openEMS_v0.0.36\openEMS\python\Tutorials>python simple_patch_antenna.py
Traceback (most recent call last):
File
"C:\openEMS_v0.0.36\openEMS\python\Tutorials\simple_patch_antenna.py", line
17, in
from CSXCAD import ContinuousStructure
File
"C:\Users\OWNER.pyenv\pyenv-win\versions\3.11.9\Lib\site-packages\CSXCAD_
*init*_.py", line 19, in
from CSXCAD.CSXCAD import ContinuousStructure
ImportError: DLL load failed while importing CSXCAD: The specified module
could not be found.
This is the extent of what I know about the error so sorry if I mentioned
something that was confusing.
One potential complication is the instructions confused me as I
interpreted them as needing to install prebuild modules and then install
modules from source (not pick one or the other). I am worried that my
attempts at the latter may have somehow messed things up.
Thanks
Marc
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBEPMFXPPBVVW47DGGPVH3ZQPQG3AVCNFSM6AAAAABLXOG7NGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRYGAYTAMY>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
OK, I'll try one (or more) of the options and let you know either way how it works out. |
Beta Was this translation helpful? Give feedback.
-
I tried B and C with the same results. |
Beta Was this translation helpful? Give feedback.
-
Hi these are the whl files from the "v0.0.36" release instead of the suggested "v0.0.36 RC-2 (MSVC) Latest" but i already tried this and i always get this result... thanks anyways |
Beta Was this translation helpful? Give feedback.
-
I just realized that this is a requirement:"The python interface for CSXCAD & openEMS requires a build with a MS Visual Compiler." I just used "Visual Studio Code" i think i have to switch to "Visual Studio". Can this be the solution? What are you using? @WidderGit |
Beta Was this translation helpful? Give feedback.
-
I have not run Open EMS in close to a year but I think I just ran it in a DOS shell.
To make sure, I just started a run using the following:
C:\openEMS\python\Tutorials>python bent_patch_antenna.py
So far it is running without error.
Note I was in the path location that had the bent_patch_antenna.py file.
Hope this helps
Marc
From: Giannix00 ***@***.***>
Sent: Saturday, June 21, 2025 11:51 AM
To: thliebig/openEMS-Project ***@***.***>
Cc: WidderGit ***@***.***>; Mention ***@***.***>
Subject: Re: [thliebig/openEMS-Project] Get error when attempting to perform python setup build (Discussion #225)
I just realized that this is a requirement:"The python interface for CSXCAD & openEMS requires a build with a MS Visual Compiler<https://wiki.python.org/moin/WindowsCompilers>." I just used "Visual Studio Code" i think i have to switch to "Visual Studio". Can this be the solution? What are you using? @WidderGit<https://github.com/WidderGit>
—
Reply to this email directly, view it on GitHub<#225 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BJ76FDTXSAUE3Q2POHHI4SL3EV5OLAVCNFSM6AAAAAB7Z6ZL3CVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNJTHA2DEOA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have been stuck for several days with these two steps:
python setup.py build_ext -IC:\opt\openEMS\include -LC:\opt\openEMS
python setup.py install
I keep getting this error:
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe' failed with exit code 2
When I do a search, the answer I get says I need to install C++ tools from Visual Studio. I have followed the C++ installation steps and I still get the same errors
Very stuck and frustrated, any help is appreciated.
Thanks
Marc
Beta Was this translation helpful? Give feedback.
All reactions