I am trying to develop a program to allow communication between my windows PC and a Raspberry Pi via bluetooth. Things have been moving smoothly on the Pi, but on my PC I cannot seem to get the bluetooth module to work correctly and I haven't seen anyone with the same error message I am getting.
I have pybluez installed, but when I try to import the bluetooth module I get the following error message: module 'socket' has no attribute 'BTPROTO_RFCOMM'. I get this error message when all I run is import bluetooth.
I also tried using sockets but I get the error: module 'socket' has no attribute 'AF_BLUETOOTH'.
I am wondering if I am missing something that is causing my socket module to not work.
I solved the problem by making a virtual environment and using conda install pybluez just in the environment. This also only worked in certain python versions for me: 2.7 and  > 3.9. I canonly run the code from the command line, but works fine now!
Importing bluetooth module to python environment on windows 10