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

Pyrealsense2 - Terminal Works, Pycharm Doesn't #4089

Closed
kat-mcg-lin opened this issue May 28, 2019 · 4 comments
Closed

Pyrealsense2 - Terminal Works, Pycharm Doesn't #4089

kat-mcg-lin opened this issue May 28, 2019 · 4 comments
Labels

Comments

@kat-mcg-lin
Copy link

kat-mcg-lin commented May 28, 2019

Required Info
Firmware Version ?
Operating System & Version Linux Ubuntu 18
Kernel Version (Linux Only) 4.9.14
Platform NVIDIA Jetson Nanno
SDK Version 2.0
Language Python

I have been using pycharm on my jetson nano with small simple codes (I'm new to python and wanted to test out basic commands) and now that I want to start using the cameras I went to install pyrealsense2. I followed the instructions here: https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python
but pycharm never recongizes pyrealsense2 when I try to import it

Traceback (most recent call last):
File "/home/user/documents/projects_pycharm/GetPixel.py", line 3, in
import pyrealsense2
ModuleNotFoundError: No module named 'pyrealsense2'

However, when I use python3 command in my terminal I can import pyrealsense2 just fine- is there something I'm missing to make Pycharm work?

#3838 --> exact issue as this person!

@RealSense-Customer-Engineering @RealSenseCustomerSupport any assistance?

@pedrombmachado
Copy link

Hi @kat-mcg-lin ,
Did you add

export PYTHONPATH="$PYTHONPATH:/usr/local/lib"
to your ~/.bashrc and

$ nano ~/.bashrc
$ source ~/.bashrc

@kat-mcg-lin
Copy link
Author

Hi!

I have run the export PYTHONPATH line before and even tried different locations, although I don't know/understand how to add it to the ~/.bashrc, is that a physical file I can open?

Also just tried running the other two lines you mentioned, the nano one returned the error:
bash: nano: command not found

the second line had no return but also no error

@pedrombmachado
Copy link

Hi @kat-mcg-lin ,
Apparently, you need to install nano (text editor) or use a different text editor (e.g. vim, kate, gedit, etc)
I suggest you read about bashrc before you edit it.

@kat-mcg-lin
Copy link
Author

Sounds good!
Thanks for your help and the article! @pedrombmachado :)

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

No branches or pull requests

3 participants