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

pyimport("tensorflow") exception in Atom #94

Closed
baggepinnen opened this issue Oct 21, 2016 · 2 comments
Closed

pyimport("tensorflow") exception in Atom #94

baggepinnen opened this issue Oct 21, 2016 · 2 comments

Comments

@baggepinnen
Copy link
Contributor

I'm using Atom for Julia developement. Unfortunately, I seem to have an issue using TensorFlow from within Atom. When using julia and tensorflow from the terminal everything is OK. using TensorFlow in Atom however throws an exception on the line pyimport("tensorflow") with the following text

PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('libcudart.so.7.5: cannot open shared object file: No such file or directory',)
  File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)

 in pyerr_check at /local/home/fredrikb/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
 in pyerr_check at /local/home/fredrikb/.julia/v0.5/PyCall/src/exception.jl:61 [inlined]
 in macro expansion at /local/home/fredrikb/.julia/v0.5/P...

For TensorFlow to work in the regular terminal, I had to set my LD_LIBRARY_PATH such that TensorFlow could find the file libcudart.so.7.5. Any ideas on whether I have to somehow do this from Atom as well, or the problem lies elsewhere?

@baggepinnen baggepinnen changed the title pyimport("tensorflow") erception in Atom pyimport("tensorflow") exception in Atom Oct 21, 2016
@malmaud
Copy link
Owner

malmaud commented Oct 21, 2016

Yes, if you need LD_LIBRARY_PATH to be set from the terminal, you're also going to need it to be set in Atom. I think if you set LD_LIBRARY_PATH in the terminal and then launch Atom, Atom will inherit the environment variable, but I'm not sure.

@malmaud
Copy link
Owner

malmaud commented Oct 24, 2016

I'll close this since it's not an issue in the scope of this package to resolve.

@malmaud malmaud closed this as completed Oct 24, 2016
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

2 participants