我已经使用PyCharm版本了,我使用的是Python 3.6.1
当我尝试安装PyBluez 0.22时,我收到错误消息
这是我的错误详情:
Collecting PyBluez
Using cached PyBluez-0.22.zip
Installing collected packages: PyBluez
Running setup.py install for PyBluez: started
Running setup.py install for PyBluez: finished with status 'error'
Complete output from command "C:\Python 3.6.1\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\m-grz\\AppData\\Local\\Temp\\pycharm-packaging\\PyBluez\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\m-grz\AppData\Local\Temp\pip-eqci78cu-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\bluetooth
copying bluetooth\ble.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\bluez.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\btcommon.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\msbt.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\osx.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\widcomm.py -> build\lib.win32-3.6\bluetooth
copying bluetooth\__init__.py -> build\lib.win32-3.6\bluetooth
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'bluetooth._msbt' extension
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
creating build\temp.win32-3.6\Release\msbt
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include" -I.\port3 "-IC:\Python 3.6.1\include" "-IC:\Python 3.6.1\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /Tcmsbt\_msbt.c /Fobuild\temp.win32-3.6\Release\msbt\_msbt.obj
_msbt.c
msbt\_msbt.c(1): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Python 3.6.1\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\m-grz\\AppData\\Local\\Temp\\pycharm-packaging\\PyBluez\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\m-grz\AppData\Local\Temp\pip-eqci78cu-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\m-grz\AppData\Local\Temp\pycharm-packaging\PyBluez\
我将非常感谢你的帮助!