Why can I not import Caffe in PyCharm but can import it in terminal?
<p>I want to import Caffe. I can import it in terminal but not in PyCharm.</p>
<p>I have tried some suggestions like adding <code>include /usr/local/cuda-7.0/lib64</code> to <code>/user/etc/ld.so.conf</code> file but still it can not import this module. However, I think this is not a good solution as I am using the CPU mode only.</p>
<p><a href="https://i.stack.imgur.com/l2q3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l2q3S.png" alt="enter image description here" /></a></p>
<p>I am using Linux Mint.</p>
<p>The output for <code>sys.path</code> in PyCharm terminal is:</p>
<pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; sys.path
['', 
'/home/user/anaconda2/lib/python27.zip', 
'/home/user/anaconda2/lib/python2.7', 
'/home/user/anaconda2/lib/python2.7/plat-linux2', 
'/home/user/anaconda2/lib/python2.7/lib-tk', 
'/home/user/anaconda2/lib/python2.7/lib-old', 
'/home/user/anaconda2/lib/python2.7/lib-dynload', 
'/home/user/anaconda2/lib/python2.7/site-packages', 
'/home/user/anaconda2/lib/python2.7/site-packages/Sphinx-1.4.1-y2.7.egg',
'/home/user/anaconda2/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg']
&gt;&gt;&gt; 
</code></pre>
<p>and when I run <code>sys.path</code> in PyCharm itself, I get:</p>
<pre class="lang-py prettyprint-override"><code>['/opt/pycharm-community-2016.2.3/helpers/pydev',
'/home/user/',
'/opt/pycharm-community-2016.2.3/helpers/pydev',
'/home/user/anaconda2/lib/python27.zip',
'/home/user/anaconda2/lib/python2.7',
'/home/user/anaconda2/lib/python2.7/plat-linux2',
'/home/user/anaconda2/lib/python2.7/lib-tk',
'/home/user/anaconda2/lib/python2.7/lib-old',
'/home/user/anaconda2/lib/python2.7/lib-dynload',
'/home/user/anaconda2/lib/python2.7/site-packages',
'/home/user/anaconda2/lib/python2.7/site-packages/Sphinx-1.4.1-py2.7.egg',
'/home/user/anaconda2/lib/python2.7/site-packages/setuptools-23.0.0-py2.7.egg',
'/home/user/anaconda2/lib/python2.7/site-packages/IPython/extensions',
'/home/user/']
</code></pre>
<p>which is not exactly the same as the time I ran it in terminal.</p>
<p>moreover, as I run the <code>import caffe</code> in PyCharm the error is as bellow:</p>
<pre class="lang-none prettyprint-override"><code>/home/user/anaconda2/bin/python /home/user/important_commands.py
Traceback (most recent call last):
  File &quot;/home/user/important_commands.py&quot;, line 11, in &lt;module&gt;
    import caffe
ImportError: No module named caffe

Process finished with exit code 1
</code></pre>