Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble installing pyrealsense from source #20

Closed
scaldara55 opened this issue Apr 5, 2017 · 1 comment
Closed

Trouble installing pyrealsense from source #20

scaldara55 opened this issue Apr 5, 2017 · 1 comment

Comments

@scaldara55
Copy link

Required Info
Camera Model R200
Firmware Version 1.0.72.06
Operating System & Version macOS Sierra Version 10.12.4 (16E195)
librealsense version 1.12.1
pyrealsense version 1.4

I'm trying to install pyrealsense from source. I run python setup.py install and that works fine.

Using /Users/scaldara/.virtualenvs/pyrs2.7-steve/lib/python2.7/site-packages
Finished processing dependencies for pyrealsense==1.4

I then start up python and do an import pyrealsense as pyrs

It comes up with this error.

(pyrs2.7-steve) 7831c1c083a2:pyrealsense scaldara$ python
Python 2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import pyrealsense as pyrs
Traceback (most recent call last):
File "", line 1, in
File "pyrealsense/init.py", line 11, in
from .utils import pp, _check_error
File "pyrealsense/utils.py", line 7, in
from .importlib import lrs
File "pyrealsense/importlib.py", line 25, in
rsutilwrapper = ctypes.CDLL(_find_extension_name())
File "pyrealsense/importlib.py", line 23, in _find_extension_name
return os.path.join(dirname, f_name)
UnboundLocalError: local variable 'f_name' referenced before assignment

With a little bit of poking around the failure. It's looking for a filename that ends in ".so" and the directory that it is looking in is "pyrealsense"

@scaldara55
Copy link
Author

I searched around and found: #10

In it, toinsson said:
"You should import the library outside of the source directory, otherwise you won't see the compiled file."

This was the cause of my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant