You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into this problem when importing nacl.public, after installing through PyPI. I think I've solved it now, but posting for comments and future reference. System: OSX 10.8.3.
import nacl.public
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyNaCl-0.1.0-py2.7-macosx-10.8-x86_64.egg/nacl/public.py", line 6, in
from . import nacl, encoding
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyNaCl-0.1.0-py2.7-macosx-10.8-x86_64.egg/nacl/nacl.py", line 77, in
lib = ffi.verify("#include <sodium.h>", libraries=["sodium"])
File "/Users/mark/org/src/cffi/cffi/api.py", line 311, in verify
lib = self.verifier.load_library()
File "/Users/mark/org/src/cffi/cffi/verifier.py", line 68, in load_library
self.compile_module()
File "/Users/mark/org/src/cffi/cffi/verifier.py", line 55, in compile_module
self._write_source()
File "/Users/mark/org/src/cffi/cffi/verifier.py", line 117, in _write_source
file = open(self.sourcefilename, 'w')
IOError: [Errno 2] No such file or directory: '/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyNaCl-0.1.0-py2.7-macosx-10.8-x86_64.egg/nacl/pycache/_cffi__xc7279a62x20a28d1e.c'
The problem persisted when installed directly from sources, however, when running the python process as root there was no error. Also, when installing with sudo python setup.py develop, running python as the user owning the source folder didn't cause any error.
After debugging the issue and searching online, I found a section in the cffi docs, with which I managed to solve the issue, by adding
ffi.verify("...", ext_package='nacl')
to the setup.py file.
The text was updated successfully, but these errors were encountered:
Ran into this problem when importing nacl.public, after installing through PyPI. I think I've solved it now, but posting for comments and future reference. System: OSX 10.8.3.
The problem persisted when installed directly from sources, however, when running the python process as root there was no error. Also, when installing with
sudo python setup.py develop
, running python as the user owning the source folder didn't cause any error.After debugging the issue and searching online, I found a section in the cffi docs, with which I managed to solve the issue, by adding
to the setup.py file.
The text was updated successfully, but these errors were encountered: