SoonSYJ / pybluez

Automatically exported from code.google.com/p/pybluez
GNU General Public License v2.0
0 stars 0 forks source link

Windows build instructions #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. setup.py fails to build pybluez on windows

What is the expected output? What do you see instead?
A smooth extension build

What version of the product are you using? On what operating system?
PyBluez 0.18, Windows XP

Please provide any additional information below.
Can you provide instructions on how to build PyBluez on Windows

Original issue reported on code.google.com by rene.f.aguirre on 10 Mar 2010 at 8:21

GoogleCodeExporter commented 8 years ago
Hello,

what exactly fails?
What is the output of "python setup.py install"?
What Python version are you using?

Please make sure that you have the Platform SDK installed and one of the 
following 
Paths exists:
      ProgramFiles\Microsoft Platform SDK for Windows XP SP2
      ProgramFiles\Microsoft Platform SDK
      ProgramFiles\Microsoft SDKs\Windows\v6.0A

Lukas

Original comment by L...@gmx.at on 10 Mar 2010 at 8:47

GoogleCodeExporter commented 8 years ago
Something had went wrong with my setup. Please disregard this issue

Thanks!

Original comment by rene.f.aguirre on 11 Mar 2010 at 2:58

GoogleCodeExporter commented 8 years ago
What about building for windows 7 64bit ?

Its still looking for Microsoft Platform SDK for Windows XP .

Gives the error:
D:\downloads\PyBluez-0.18\PyBluez-0.18>python setup.py install
Can't find the Windows XP Platform SDK 

Any work around ?

Commenting out the check for the Platform sdk gives this:
D:\downloads\PyBluez-0.18\PyBluez-0.18>python setup.py install
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\bluetooth
copying bluetooth\bluez.py -> build\lib.win-amd64-2.7\bluetooth
copying bluetooth\btcommon.py -> build\lib.win-amd64-2.7\bluetooth
copying bluetooth\msbt.py -> build\lib.win-amd64-2.7\bluetooth
copying bluetooth\osx.py -> build\lib.win-amd64-2.7\bluetooth
copying bluetooth\widcomm.py -> build\lib.win-amd64-2.7\bluetooth
copying bluetooth\__init__.py -> build\lib.win-amd64-2.7\bluetooth
running build_ext
building 'bluetooth._msbt' extension
error: Unable to find vcvarsall.bat

I'm running windows 7 64 bit , visual studio 2010(full install including 
platform sdk)

vcvarsall.bat is in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC

Windows sdk is in
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A

I've tried modifying setup.py but it appears the troubles in distutils ?
Doesn't seem to be aware of visual studio 2010 ?

Thanks
Alex

Original comment by alxxtheg...@gmail.com on 26 Sep 2010 at 3:53

GoogleCodeExporter commented 8 years ago
I'm having the same problem with Win7x64.  I've also tried modifying the path 
in setup.py  to v7.0 but then the build fails with a gcc error about not 
finding sal.h.
any help?
My apologies if this is too similar to previous posts.
cheers,
Mike

Original comment by MEH2...@gmail.com on 1 Mar 2011 at 8:29

GoogleCodeExporter commented 8 years ago
I am having the same problem. I tried editing the install but I get the error:
package directory 'bluetooth' does not exist
When running build.py, when it clearly does exist. Windows 7 x64

Original comment by Adam.W...@gmail.com on 1 Nov 2011 at 4:45

GoogleCodeExporter commented 8 years ago
So did anyone resolve this, or is it still an open issue?

Original comment by craig.sh...@gmail.com on 11 Jan 2012 at 12:03

GoogleCodeExporter commented 8 years ago
I got PyBluez to install under Win7x64 under Python 2.7 32bit.

You need to install a few dependencies to get it to build properly;
Microsoft Windows SDK 7.1
Visual C++ 2008 Express
BTW SDK: http://www.broadcom.com/support/bluetooth/sdk.php

Then I edited setup.py to point to the proper paths. See attached. Make sure 
python compiles with VC++ and not mingw. 

Original comment by louai.ab...@gmail.com on 27 Feb 2012 at 3:44

Attachments:

GoogleCodeExporter commented 8 years ago
I have a working build and will release it with PyBluez 0.19.

Original comment by lukas.he...@gmail.com on 27 Feb 2012 at 9:05

GoogleCodeExporter commented 8 years ago
I've installed Microsoft Windows SDK 7.1 and VC++ 2008 Express but I still have 
the following error after the execution of the command:

File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

I resolved the problem by executing myself the vcvars32.bat in "C:\Program 
Files (x86)\Microsoft Visual Studio 9.0\VC\bin\" and re-executing the 
'python.exe setup.py install' command in the same cmd.exe. It seems that the 
argument passed to vcvarsall.bat is "x64" (because I'am on Win7 x64?) and 
distutils cannot find the vcvars32.bat which finally execute the "C:\Program 
Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" file. 

Original comment by darko.pe...@gmail.com on 8 Mar 2012 at 11:10

GoogleCodeExporter commented 8 years ago
I've followed the steps outlined in Comment 7, but can't import the bluetooth 
module on Win7 64-bit after doing so.  I get the following:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bluetooth\__init__.py", line 31, in <module>
    from msbt import *
  File "bluetooth\msbt.py", line 2, in <module>
    import _msbt as bt
ImportError: No module named _msbt

Hoping for a suggestion or next steps.  TIA.

Original comment by dancas...@gmail.com on 3 Oct 2012 at 7:51

GoogleCodeExporter commented 8 years ago
Most recent build instructions are now in repo - revision r61

README file

Original comment by karu...@wp.pl on 19 Jan 2014 at 7:03