Thanks for taking your time to report this issue and help making Ubuntu better.
I get the same error message when attempting to import pygit2 (version 0.22.0-3) on Ubuntu Wily, see below for error messages. Though, after installing python-dev, python3-dev and libgit2-dev, and prefixing the imports with sudo it looks like things started to work. Strange.
>Though I am filing this bug against python-pygit2, I encountered the issue by installing python3-pygit2, which Launchpad isn't finding.
You've come to the right place. Launchpad keeps track of the source package, which in this case is called python-pygit2. The source package is then built to produce the binary packages, which are the installable ones. Since multiple binary packages might come from the same source package, bug reports are reported against the source package. Btw, if you report bugs via `ubuntu-bug` it will automatically look up and file the report against the correct source package. You may learn more about ubuntu-bug (and bug reporting in general) at https://wiki.ubuntu.com/ReportingBugs.
$ python -c 'import pygit2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/pygit2/__init__.py", line 35, in <module>
from .blame import Blame, BlameHunk
File "/usr/lib/python2.7/dist-packages/pygit2/blame.py", line 32, in <module>
from .errors import check_error
File "/usr/lib/python2.7/dist-packages/pygit2/errors.py", line 29, in <module>
from .ffi import ffi, C
File "/usr/lib/python2.7/dist-packages/pygit2/ffi.py", line 35, in <module>
ffi, C = get_ffi()
File "/usr/lib/python2.7/dist-packages/pygit2/_utils.py", line 101, in get_ffi
include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 373, in verify
lib = self.verifier.load_library()
File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 95, in load_library
self._write_source()
File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 183, in _write_source
with open(self.sourcefilename, "w") as fp:
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/pygit2/__pycache__/pygit2_cffi_ab5e9344x5470904.c'
$ python3 -c 'import pygit2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pygit2/__init__.py", line 35, in <module>
from .blame import Blame, BlameHunk
File "/usr/lib/python3/dist-packages/pygit2/blame.py", line 32, in <module>
from .errors import check_error
File "/usr/lib/python3/dist-packages/pygit2/errors.py", line 29, in <module>
from .ffi import ffi, C
File "/usr/lib/python3/dist-packages/pygit2/ffi.py", line 35, in <module>
ffi, C = get_ffi()
File "/usr/lib/python3/dist-packages/pygit2/_utils.py", line 101, in get_ffi
include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
File "/usr/lib/python3/dist-packages/cffi/api.py", line 373, in verify
lib = self.verifier.load_library()
File "/usr/lib/python3/dist-packages/cffi/verifier.py", line 95, in load_library
self._write_source()
File "/usr/lib/python3/dist-packages/cffi/verifier.py", line 183, in _write_source
with open(self.sourcefilename, "w") as fp:
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/pygit2/__pycache__/pygit2_cffi_1b714a1x5470904.c'
Thanks for taking your time to report this issue and help making Ubuntu better.
I get the same error message when attempting to import pygit2 (version 0.22.0-3) on Ubuntu Wily, see below for error messages. Though, after installing python-dev, python3-dev and libgit2-dev, and prefixing the imports with sudo it looks like things started to work. Strange.
>Though I am filing this bug against python-pygit2, I encountered the issue by installing python3-pygit2, which Launchpad isn't finding.
You've come to the right place. Launchpad keeps track of the source package, which in this case is called python-pygit2. The source package is then built to produce the binary packages, which are the installable ones. Since multiple binary packages might come from the same source package, bug reports are reported against the source package. Btw, if you report bugs via `ubuntu-bug` it will automatically look up and file the report against the correct source package. You may learn more about ubuntu-bug (and bug reporting in general) at https:/ /wiki.ubuntu. com/ReportingBu gs.
$ python -c 'import pygit2' python2. 7/dist- packages/ pygit2/ __init_ _.py", line 35, in <module> python2. 7/dist- packages/ pygit2/ blame.py" , line 32, in <module> python2. 7/dist- packages/ pygit2/ errors. py", line 29, in <module> python2. 7/dist- packages/ pygit2/ ffi.py" , line 35, in <module> python2. 7/dist- packages/ pygit2/ _utils. py", line 101, in get_ffi dirs=[libgit2_ include] , library_ dirs=[libgit2_ lib]) python2. 7/dist- packages/ cffi/api. py", line 373, in verify load_library( ) python2. 7/dist- packages/ cffi/verifier. py", line 95, in load_library _write_ source( ) python2. 7/dist- packages/ cffi/verifier. py", line 183, in _write_source sourcefilename, "w") as fp: python2. 7/dist- packages/ pygit2/ __pycache_ _/pygit2_ cffi_ab5e9344x5 470904. c'
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/
$ python3 -c 'import pygit2' python3/ dist-packages/ pygit2/ __init_ _.py", line 35, in <module> python3/ dist-packages/ pygit2/ blame.py" , line 32, in <module> python3/ dist-packages/ pygit2/ errors. py", line 29, in <module> python3/ dist-packages/ pygit2/ ffi.py" , line 35, in <module> python3/ dist-packages/ pygit2/ _utils. py", line 101, in get_ffi dirs=[libgit2_ include] , library_ dirs=[libgit2_ lib]) python3/ dist-packages/ cffi/api. py", line 373, in verify load_library( ) python3/ dist-packages/ cffi/verifier. py", line 95, in load_library _write_ source( ) python3/ dist-packages/ cffi/verifier. py", line 183, in _write_source sourcefilename, "w") as fp: python3/ dist-packages/ pygit2/ __pycache_ _/pygit2_ cffi_1b714a1x54 70904.c'
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.
PermissionError: [Errno 13] Permission denied: '/usr/lib/