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

I have a suspicion that this is related to the parser that BS will use to read the HTML. They document is here, but if you’re like me (on OSX) you might be stuck with something that requires a bit of work: You’ll notice that in the BS4 documentation page above, they point out that … Read more

Cannot find module cv2 when using OpenCV

First do run these commands inside Terminal/CMD: conda update anaconda-navigator conda update navigator-updater Then the issue for the instruction below will be resolved For windows if you have anaconda installed, you can simply do pip install opencv-python or conda install -c https://conda.binstar.org/menpo opencv if you are on linux you can do : pip install opencv-python … Read more

urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error

This isn’t a solution to your specific problem, but I’m putting it here because this thread is the top Google result for “SSL: CERTIFICATE_VERIFY_FAILED”, and it lead me on a wild goose chase. If you have installed Python 3.6 on OSX and are getting the “SSL: CERTIFICATE_VERIFY_FAILED” error when trying to connect to an https:// … Read more

How to sort a dataFrame in python pandas by two or more columns?

As of the 0.17.0 release, the sort method was deprecated in favor of sort_values. sort was completely removed in the 0.20.0 release. The arguments (and results) remain the same: df.sort_values([‘a’, ‘b’], ascending=[True, False]) You can use the ascending argument of sort: df.sort([‘a’, ‘b’], ascending=[True, False]) For example: In [11]: df1 = pd.DataFrame(np.random.randint(1, 5, (10,2)), columns=[‘a’,’b’]) … Read more

How to uninstall Python 2.7 on a Mac OS X 10.6.4?

Do not attempt to remove any Apple-supplied system Python which are in /System/Library and /usr/bin, as this may break your whole operating system. NOTE: The steps listed below do not affect the Apple-supplied Python 2.7; they only remove a third-party Python framework, like those installed by python.org installers. The complete list is documented here. Basically, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)