I've installed Tensorflow within a virtual environment on my machine. It works from the command line but when I try to run it from Pycharm it gives the following error: Pycharm Console Output
The project interpreter is set to virtualenv at ~/tensorflow and for the interpreter paths the following ones are set:
- /home/user/tensorflow/lib/python3.5
- /home/user/tensorflow/lib/python3.5/plat-x86_64-linux-gpu
- /home/user/tensorflow/lib/python3.5/lib-dynload
- /usr/lib/python3.5
- /usr/lib/python3.5/plat-x86_64-linux-gnu
- /home/user/tensorflow/lib/python3.5/site-packages
- /usr/lib/python3.5/site-packages
- /usr/local/lib/python3.5/dist-packages
- /usr/lib/python3/dist-packages
The code (from a tutorial) I've tried to run is the following:
import tensorflow as tf
x = tf.constant(35, name='x')
y = tf.Variable(x + 5, name='y')
model = tf.global_variables_initializer()
with tf.Session() as session:
session.run(model)
print(session.run(y))
So what could this error be related to?
etc/profile
– xxiecho $0
to check which bash is using. Then check cuda path, if not exist, add it. e.g. you add path atbash
but you are usingzsh
– xxi