ireapps / pycar

NICAR Python mini boot camp
https://ireapps.github.io/pycar/pycar_intro.html
MIT License
101 stars 36 forks source link

BeautifulSoup4 may need to be upgraded #44

Closed esagara closed 7 years ago

esagara commented 7 years ago

I just tried bootstrapping the pycar repo using pip install -r requirements.txt. When importing BeautifulSoup it throws an error - ImportError: cannot import name 'HTMLParseError'. This is fixed by running pip install --upgrade beautifulsoup4. Apparently this has been an issue since Python 3.5. Do we need to update requirements.txt?

tommeagher commented 7 years ago

I'm assuming you used pip3 install beautifulsoup4?

I haven't had that issue, but if it's common, we should address it. Do you want to update requirements.txt?

It shouldn't be a problem in the class, since it's already installed on the machines, but will be good for the repo to work for folks when they get home.

esagara commented 7 years ago

I've been using pyenv to manage my python versions, so I did not need the pip3 command. Is there a reason for the version requirement? I don't want to alter it and break something down the road.

rdmurphy commented 7 years ago

pip3 (and python3) are where Python 3 lives in scenarios where both versions have been installed. Main reason is to avoid breaking all the things where python is expected to be v2 in build chains. Dunno what computers y'all are using for the class, but I know this is the case with Homebrew and MacOS.

If you use something like pyenv or virtualenv to create a Python 3 environment, it'll point pip at pip3 (and python at python3) for you because you've safely left the land of "system" Python.