Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Python 3.3 cannot import BeautifulSoup but Python 3.2 can

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


edcjones at comcast

May 7, 2012, 1:42 PM

Post #1 of 4 (722 views)
Permalink
Python 3.3 cannot import BeautifulSoup but Python 3.2 can

I use up-to-date Debian testing (wheezy), amd64 architecture. I compiled
and installed Python 3.3.0 alpha 3 using "altinstall". Debian wheezy comes
with python3.2 (and 2.6 and 2.7). I installed the Debian package
python3-bs4 (BeautifulSoup4 for Python3). I also downloaded a "clone"
developmental copy of 3.3.

Python3.3a3 cannot find module bs4. Neither can the "clone". Python3.2 can
find the module. Here is a session with the "clone":

> ./python
Python 3.3.0a3+ (default:10ccbb90a8e9, May 6 2012, 19:11:02)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bs4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 974, in _find_and_load
ImportError: No module named 'bs4'
[71413 refs]
>>>

What is the problem?

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

May 7, 2012, 2:03 PM

Post #2 of 4 (765 views)
Permalink
Re: Python 3.3 cannot import BeautifulSoup but Python 3.2 can [In reply to]

Hello,

On Mon, 07 May 2012 16:42:50 -0400
"Edward C. Jones" <edcjones [at] comcast> wrote:
> I use up-to-date Debian testing (wheezy), amd64 architecture. I compiled
> and installed Python 3.3.0 alpha 3 using "altinstall". Debian wheezy comes
> with python3.2 (and 2.6 and 2.7). I installed the Debian package
> python3-bs4 (BeautifulSoup4 for Python3). I also downloaded a "clone"
> developmental copy of 3.3.
>
> Python3.3a3 cannot find module bs4. Neither can the "clone". Python3.2 can
> find the module. Here is a session with the "clone":

python-dev is for development *of* Python. For general Python
questions, you should ask on python-list:
http://mail.python.org/mailman/listinfo/python-list

(quick answer: you must install BeautifulSoup specifically for your
compiled interpreter. Python does not share libraries accross
different interpreter versions)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


phd at phdru

May 7, 2012, 2:12 PM

Post #3 of 4 (725 views)
Permalink
Re: Python 3.3 cannot import BeautifulSoup but Python 3.2 can [In reply to]

On Mon, May 07, 2012 at 04:42:50PM -0400, "Edward C. Jones" <edcjones [at] comcast> wrote:
> I use up-to-date Debian testing (wheezy), amd64 architecture. I compiled
> and installed Python 3.3.0 alpha 3 using "altinstall". Debian wheezy comes
> with python3.2 (and 2.6 and 2.7). I installed the Debian package
> python3-bs4 (BeautifulSoup4 for Python3). I also downloaded a "clone"
> developmental copy of 3.3.
>
> Python3.3a3 cannot find module bs4.

Could it be bs4 is installed in python3.2-specific path and hence it's
not in python3.3 sys.path?

Oleg.
--
Oleg Broytman http://phdru.name/ phd [at] phdru
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


barry at python

May 7, 2012, 2:42 PM

Post #4 of 4 (700 views)
Permalink
Re: Python 3.3 cannot import BeautifulSoup but Python 3.2 can [In reply to]

On May 07, 2012, at 04:42 PM, Edward C. Jones wrote:

>I use up-to-date Debian testing (wheezy), amd64 architecture. I compiled
>and installed Python 3.3.0 alpha 3 using "altinstall". Debian wheezy comes
>with python3.2 (and 2.6 and 2.7). I installed the Debian package
>python3-bs4 (BeautifulSoup4 for Python3). I also downloaded a "clone"
>developmental copy of 3.3.
>
>Python3.3a3 cannot find module bs4. Neither can the "clone". Python3.2 can
>find the module. Here is a session with the "clone":

Remember that Debian installs its system packages into dist-packages not
site-packages. This is a Debian delta from upstream.

http://wiki.debian.org/Python

Cheers,
-Barry

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.