These are chat archives for ipython/ipython

18th
Jul 2015
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 19:52
Hello, I'm having an unusal issue trying to use the bluetooth library (PyBluez) for linux in IPython. I can run import bluetooth completely fine in a standard python terminal, but once executed in ipython I get this error http://www.pasteall.org/59675. This same error DOES occur if I attempt to import bluetooth while in the directory pybluez was cloned into and installed from. Any ideas?
Anton Akhmerov
@akhmerov
Jul 18 2015 19:54
What does python -c 'import bluetooth; print(bluetooth.__file__) give?
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 19:55
/home/ipyserver/anaconda3/lib/python3.4/site-packages/PyBluez-0.22-py3.4-linux-x8664.egg/bluetooth/_init.py
Anton Akhmerov
@akhmerov
Jul 18 2015 19:58
That seems a different location from where ipython finds it. Can you verify that running the same command but with ipython instead of python?
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 19:59
Nope, returned the same : /home/ipyserver/anaconda3/lib/python3.4/site-packages/PyBluez-0.22-py3.4-linux-x8664.egg/bluetooth/_init.py
Anton Akhmerov
@akhmerov
Jul 18 2015 20:00
But the paste you shared has a different path.
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 20:00
Really? It looks the same to me. Where?
oh the paste sorry
one sec
Your right, though I'm not exactly sure how to fix this.
Aha I fixed the problem. Thanks for your help.
Anton Akhmerov
@akhmerov
Jul 18 2015 20:05
I actually didn't expect the command would work with ipython, it suggests that ipython can import bluetooth after all.
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 20:05
For some reason the .egg directory contained _bluetooth.py but the /lib/python3.4/bluetooth did not
It's all fixed now
Yeah, I guess Ipython was importing bluetooth, but then crashing because bluetooth.py couldn't import its other dependencies
GlyphicAnimation
@GlyphicAnimation
Jul 18 2015 20:08
Ha ha, thanks for the help.