How to re-install lxml?

后端 未结 4 1019
一个人的身影
一个人的身影 2020-12-09 16:45

Python version and Device used

  • Python 2,7.5
  • Mac 10.7.5
  • BeautifulSoup 4.2.1.

I\'m following the BeautifulSoup tu

4条回答
  •  有刺的猬
    2020-12-09 17:18

    FWIW, I ran into a similar problem (python 3.6, os x 10.12.6) and was able to solve it simply by doing (first command is just to signify that I was working in a conda virtualenv):

    $ source activate ml-general
    $ pip uninstall lxml
    $ pip install lxml
    

    I tried more complicated things first, because BeautifulSoup was working correctly with an identical command through Jupyter+iPython, but not through PyCharm's terminal in the same virtualenv. Simply reinstalling lxml as above solved the problem.

提交回复
热议问题