Ubuntu - How to install a Python module (BeautifulSoup) on Python 3.3 instead of Python 2.7? -
i have code (as written in bs4 documentaion):
bs4 import beautifulsoup
when run script (using python3) error:
importerror: no module named 'bs4'
so installed beatifulsoup by:
sudo pip install beatifulsoup4
but when seek run script 1 time again same error. indeed bs4 installed in:
beautifulsoup4 in /usr/local/lib/python2.7/dist-packages
but want install , utilize python3.3 (as there other module not working python2.7).
i tried with:
virtualenv --python=/usr/bin/python2.7 /usr/bin/python3.3
and install bs4 again, nil solved.
any clue? in advance
ubuntu has beautifulsoup packaged. found running apt-cache search
$ apt-cache search beautifulsoup
i see has both 2.7 , 3.3 version in results. can 3.3 version installing python3-bs4
$ sudo apt-get install python3-bs4
python python-2.7 ubuntu beautifulsoup python-3.3
No comments:
Post a Comment