Python Forum
Problems with moving from 3.5 to 3.6
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with moving from 3.5 to 3.6
#1
So I have Ubuntu and I wanted to try Python 3.6, so I installed it using "apt altinstall" command.

After playing around with it, I decided to see how it executes my earlier scripts and opened a webscraper of mine, which uses requests and beautifulsoup.

And problems appeared. Python 3.6 does not see the "requests" module. The module is located in the folder "/usr/lib/python3/dist-packages/" which by default is not a part of Python 3.6's sys.path. After some googling around I still don't know how to make python 3.6 permanently know that libraries should be sought in that folder.

Okay, so I added to my script the line "import sys; sys.path.append('/usr/lib/python3/dist-packages/')" which solved the problem (in a rather ugly way), but now another problem appeared: beautifulsoup does not know what lxml is anymore.


Quote:bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

I am at a loss. What I am supposed to do with those problems?
Reply


Messages In This Thread
Problems with moving from 3.5 to 3.6 - by Hellerick - Dec-27-2016, 09:35 AM
RE: Problems with moving from 3.5 to 3.6 - by wavic - Dec-27-2016, 10:44 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020