FS#21956 - python2 bug or missing python package or...?

Attached to Project: Arch Linux
Opened by Gajo Petrovic (gajop) - Thursday, 02 December 2010, 05:27 GMT
Last edited by Allan McRae (Allan) - Thursday, 02 December 2010, 07:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When trying to install calibre I came up with this error:
Traceback (most recent call last):
File "setup.py", line 99, in <module>
sys.exit(main())
File "setup.py", line 85, in main
command.run_all(opts)
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/setup/__init__.py", line 159, in run_all
self.run_cmd(self, opts)
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/setup/__init__.py", line 152, in run_cmd
self.run_cmd(scmd, opts)
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/setup/__init__.py", line 155, in run_cmd
cmd.run(opts)
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/setup/gui.py", line 36, in run
self.build_forms()
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/setup/gui.py", line 59, in build_forms
from calibre.gui2 import build_forms
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/src/calibre/gui2/__init__.py", line 19, in <module>
from calibre.ebooks.metadata.meta import get_metadata, metadata_from_formats
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/src/calibre/ebooks/metadata/meta.py", line 11, in <module>
from calibre.customize.ui import get_file_type_metadata, set_file_type_metadata
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/src/calibre/customize/ui.py", line 14, in <module>
from calibre.customize.builtins import plugins as builtin_plugins
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/src/calibre/customize/builtins.py", line 454, in <module>
from calibre.devices.apple.driver import ITUNES
File "/tmp/yaourt-tmp-gajop/aur-calibre/src/calibre/src/calibre/devices/apple/driver.py", line 8, in <module>
import cStringIO, ctypes, datetime, os, re, shutil, subprocess, sys, tempfile, time
File "/usr/lib/python2.7/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

Which further led me too look into python's /usr/lib/python2.7/ctypes/__init__.py .
It seems that it's trying to import _ctypes. Trying to run it from the interpreter
$ python2
Python 2.7.1 (r271:86832, Dec 1 2010, 13:37:44)
[GCC 4.5.1 20101125 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ctypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named _ctypes
>>>

but it works with python3
$ python3
Python 3.1.3 (r313:86834, Dec 1 2010, 12:16:07)
[GCC 4.5.1 20101125 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ctypes
>>>


$ pacman -Qi python2
Name : python2
Version : 2.7.1-1
URL : http://www.python.org
Licenses : PSF
Groups : None
Provides : None
Depends On : db bzip2 gdbm openssl zlib expat sqlite3
Optional Deps : tk: for IDLE
Required By : asciidoc brltty centerim cherrypy compizconfig-python
dbus-python denyhosts django eog fail2ban farsight2
fetchmail finch fontforge gdb gnome-doc-utils
gobject-introspection gpsd gvim inkscape iotop kdeedu-kig
kdesdk-kcachegrind kdesdk-scripts libieee1284
libtorrent-rasterbar lirc-utils mercurial
mlt-python-bindings mod_wsgi mysql-python namcap opencv
openoffice-base pycairo pychecker pycrypto pycups
pygobject pygoocanvas pyopenssl pyorbit pypanel pyrex
pysmbc python-babel python-beautifulsoup python-cssutils
python-dateutil python-dnspython python-feedparser
python-genshi python-imaging python-lxml python-m2crypto
python-markupsafe python-mechanize python-numpy
python-paramiko python-pexpect python-psycopg2
python-pygame python-pypdf python-pysqlite python-pytz
python-scipy python-simplejson python-xlib
python2-distribute python2-gnomevfs python2-sqlalchemy
pyxdg pyxml sip speech-dispatcher totem trac twisted
virtualbox_bin wxpython zope-interface
Conflicts With : python<3
Replaces : None
Installed Size : 70272.00 K
Packager : Unknown Packager
Architecture : x86_64
Build Date : Wed 01 Dec 2010 02:39:29 PM CET
Install Date : Thu 02 Dec 2010 05:29:25 AM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description : A high-level scripting language
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 02 December 2010, 07:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.7.1-2

Loading...