Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can build it for 32bit environment #8

Closed
Vonham opened this issue Mar 13, 2018 · 14 comments
Closed

Can build it for 32bit environment #8

Vonham opened this issue Mar 13, 2018 · 14 comments

Comments

@Vonham
Copy link

Vonham commented Mar 13, 2018

Hello, I love your work. Thank you for sharing
Can I build this for 32bit env?

@ntpincus
Copy link

I would like to build it for 32bit as well. Trying to figure out what that involves

@ntpincus
Copy link

Everything seems to be working for 32bit, the only change I needed to make was in setup.py
Around line 80 I changed the extra_link_args to also look at the Win32 portaudio lib as follows
```
bits = platform.architecture()[0]
elif '64' in bits:
extra_link_args.append(os.path.join(portaudio_path, 'build/msvc/x64/Release/portaudio.lib'))
else:
extra_link_args.append(os.path.join(portaudio_path, 'build/msvc/Win32/Release/portaudio.lib'))


after that I could build it in Win32 with setup.py, and then I ran setup.py install --skip-build

@intxcc
Copy link
Owner

intxcc commented Sep 30, 2018

Merged your code. I can't verify it, but the code looks plausible.
Commit: fc19193

@intxcc intxcc closed this as completed Sep 30, 2018
@YuHuangqi
Copy link

Everything seems to be working for 32bit, the only change I needed to make was in setup.py
Around line 80 I changed the extra_link_args to also look at the Win32 portaudio lib as follows

**bits = platform.architecture()[0]**
**elif '64' in bits**:
extra_link_args.append(os.path.join(portaudio_path, 'build/msvc/x64/Release/portaudio.lib'))
**else: extra_link_args.append(os.path.join(portaudio_path, 'build/msvc/Win32/Release/portaudio.lib'))**

after that I could build it in Win32 with setup.py, and then I ran setup.py install --skip-build

可用!!!
不过会出现ImportError: DLL load failed问题,将portaudio_x86.dll文件copy到你的python37-32的安装目录地下“lib/site-pakages/PyAudio-0.2.11-py3.7-win32.egg”即可。

@intxcc
Copy link
Owner

intxcc commented Jul 12, 2019

Hi @YuHuangqi could you please write your comment in english, as I am sadly not able to read chinese. Otherwise I won't be able to help if you experience problems with this fork.

Thank you.

@lxu0118
Copy link

lxu0118 commented Nov 8, 2019

Hi @YuHuangqi could you please write your comment in english, as I am sadly not able to read chinese. Otherwise I won't be able to help if you experience problems with this fork.

Thank you.

English version:
It works!!!
But it may prompt "ImportError: DLL load failed" error. In order to fix this issue, should copy portaudio_x86.dll to “lib/site-pakages/PyAudio-0.2.11-py3.7-win32.egg” which is under your python37-32 installation directory.

My words:
I hope you can understand my English version. I am going to install x86 32bit version, hope it works. Have a good day.

@YuHuangqi
Copy link

@lxu0118
Thank for your translation!

@maximeBAY
Copy link

Can anyone please provide detailed information on how to proceed to install for 32 bit? I am having issues attempting to install it.

Thanks!

@elibroftw
Copy link

elibroftw commented Aug 5, 2020

VS2019 32-bit Instructions. I made PR for this, but in the meantime, you can follow the readme here https://github.com/elibroftw/pyaudio_portaudio

Here's the Python 3.8 32-bit version https://github.com/elibroftw/music-caster/blob/master/build_files/PyAudio-0.2.11-cp38-cp38-win32.whl

@pssolanki111
Copy link

@ntpincus @intxcc Sorry for digging in an old thread, but any chance you have a pre-compiled wheel for Py37 on 32 bit? I would appreciate any help or suggestion :)

@elibroftw
Copy link

elibroftw commented Oct 17, 2020

@ntpincus @intxcc Sorry for digging in an old thread, but any chance you have a pre-compiled wheel for Py37 on 32 bit? I would appreciate any help or suggestion :)

I wrote the instructions above. Just follow them. I have the py38 32bit wheel if you need it (the link above your reply).
I'm going to fork and make a PR.

@pssolanki111
Copy link

@elibroftw Appreciate your response. I actually know how to build a wheel. I'm just very low on storage on my laptop (a notebook, to be precise). Installing VS alongside C++ build tools and Windows 10 SDK would take up around 6 GB of space (excluding VS, the IDE). I don't have that much space :( . I only need either PyAudio wheel for my system or any other forked project to get mic input.

@elibroftw
Copy link

@pssolanki111 for the past hour I tried to create a Github actions but I got to the msbuild part where I ran into some issues on how the linking works. How I compiled the wheel for 32 bit is by dynamic linking but for msbuild to work I need static linking but then the setup.py doesn't work. I tried my best but if you really can't spare the storage and you need this, you'll have to create a Github workflow yourself.

@pssolanki111
Copy link

@elibroftw hmm. Well thank you for giving it a try. I haven't worked with Github Workflows before, but I'll try to pick it up on the fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants