Use BeautifulSoup with Spyder

I have been trying various IDE for working with Python on my Mac and I have finally decided for using Spyder. I would be using Ninja IDE since I had previous experience with it in Windows and Linux, but for whatever reason, it has no compiled build for Mac, and I was not in the mood to try and build it myself from source code, so I'm going with Spyder.

I'm linking it quite a bit. Al least for the simple projects I'm working on it's more than enough. I'm also using the BeautifulSoup library to extract web page info, and after following the installation instructions in it's web page, my script in Spyder did not find the library.

After a little research, problems seems to be that Spyder uses it's own version of Python, so it could not detect the Python libraries I had installed. To solve it, we have to tell Spyder to use the Python we have installed. We go to:

Spyder -> Preferences… -> Console -> Advanced settings

Then we select the Use the following Python interpreter option, and in my case, the path is /usr/bin/python

Leave a Reply

Your email address will not be published. Required fields are marked *