Closed michaelschem closed 9 months ago
works on Linux and windows, I also tried on a Mac, but it seems not work. Have you tried on a virtual machine on mac?
I have not tried on a virtual machine for mac yet. I was thinking the problem was probably with my chip architecture since I'm on an M1. I'll try in a virtual machine and update here.
I tried on a Mac x86 interl i5 cpu, also not work. But definitely works well on Linux and Windows.
pip install pysoem on Intel Mac also results in
No matching distribution found for pysoem
any tricks to roll this on mac? (no VM)
@tom9672 Hi, I tried on a Mac x86 intel i7 cpu, and it works well for me. What I did was download the source code and add some code for platform adaptation.
elif sys.platform.startswith('darwin'):
soem_macros = []
soem_lib_dirs = []
soem_libs = ['pthread', 'pcap']
os_name = 'macosx'
Then, you can use the following command to install the pysoem library in the same directory as the setup.py
file.
pip install .
ps: I changed the version number to 1.1.5.
Oh, If you find that master.open(ifname)
fails, please modify the read and write permissions of the mac's network port.
For example, I use the following command to open the permissions of four thunderbolt ports.
sudo chmod 777 /dev/bpf*
Enjoy it!
Thank you @Ice-Panda for sharing, this was already available on a branch: https://github.com/bnjmnp/pysoem/blob/add_macos/setup.py I just merged it into mainline. Now also binary wheels are build for macOS, so no build step is needed during the install. With that I think we can close this now.
I get the following error when I try to install on mac.
I noticed that
sys.platform
returnsdarwin
for mac, so I've added the following to the setup.py. I'm using macosx as I see that folder insoem/osal
and it seems to be the right place.Now I get down to:
I'm working on figuring out what's going on here, but I figured I'd open an issue to see if smarter minds than my own know what's going on here.
Also worth noting that I can build the c SOEM package: