python3-pygit2 installation with apt-get is incomplete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-pygit2 (Debian) |
Fix Released
|
Unknown
|
|||
python-pygit2 (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Hello,
I just attempted to use pygit2 in Python3.4 on today's daily build of Ubuntu 15.10. (15.04 doesn't seem to have pygit2 packaged.)
Though I am filing this bug against python-pygit2, I encountered the issue by installing python3-pygit2, which Launchpad isn't finding. Python 2 suffers the same issue.
Expected behavior:
I expect these two commands to exit without error when issued (after enabling the universe packages):
sudo apt-get install python-pygit2
python -c 'import pygit2'
Actual behavior:
python-pygit2 installs fine.
Output from the Python command, triple-quoted:
"""
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
from .blame import Blame, BlameHunk
File "/usr/lib/
from .errors import check_error
File "/usr/lib/
from .ffi import ffi, C
File "/usr/lib/
ffi, C = get_ffi()
File "/usr/lib/
include_
File "/usr/lib/
lib = self.verifier.
File "/usr/lib/
self.
File "/usr/lib/
with open(self.
IOError: [Errno 2] No such file or directory: '/usr/lib/
"""
Possible resolution:
Since it looks like a missing generated-cache file, 'sudo !!' looked like a viable next step. A missing Python.h notice suggests the 'python-dev' package was needed. Trying to import pygit2 again showed a complaint for a missing git2.h, suggesting the package 'libgit2-dev' was needed. Finally, one last "sudo python -c 'import pygit2'" creates another needed object file. pygit2 is usable after that.
The above resolution works the same with Python 3.
From the "-dev" packages and sudo calls needed, it looks like pygit2 as packaged doesn't complete all of the building necessary.
Changed in python-pygit2 (Debian): | |
status: | Unknown → Fix Released |
Changed in python-pygit2 (Ubuntu): | |
importance: | Undecided → High |
One more note on execution environment: I performed this test on the 2015-07-16 Ubuntu 15.10 daily build ISO, within the Live environment.