9
pip install http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz
questo installa il pacchetto bs4 e tutto è ok. Ma se posso aggiungere questa linea al requirements.txtpacchetto di installazione pip dall'URL
http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz
ed eseguire
pip install -r requirements.txt
l'uscita è
Downloading/unpacking http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz (from -r requirements.txt (line 40))
Downloading BeautifulSoup-4.0b.tar.gz (42Kb): 42Kb downloaded
Running setup.py egg_info for package from http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz
ma il pacchetto non viene installato.
>>> import bs4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named bs4
Ci dispiace, ma non posso riproduci questo Per me va bene. – nisc
a) hai provato 'import BeautifulSoup' e b) hai controllato il percorso Python per vedere se BS è stato effettivamente installato e c) stai usando virtualenv o qualcosa del genere? –
è installato come pacchetto bs4, poiché è una versione 4.0. È importato come BeautifulSoup nella versione 3.2 –