manually building installing python packages in linux so they are recognized
<p>My system is SLES 11.4 having python 2.6.9.
I know little about python and have not found where to download rpm's that give me needed python packages.<br>
I acquired numpy 1.4 and 1.11 and I believe did a successful <code>python setup.py build</code> followed by <code>python setup.py install</code> on numpy.
Going from memory I think this installed under <code>/usr/local/lib64/python2.6/...</code></p>

<p>Next I tried building &amp; installing matplotlib (which requires numpy) and when I do <code>python setup.py build</code> it politely responds with cannot find numpy.  So my questions are</p>

<p>do i need to set some kind of python related environment variable, something along the lines of LD_LIBRARY_PATH or PATH ?</p>

<p>As I get more involved with using python installing packages that I have to build from source I need to understand where things currently are per the default install of python, where new things should go, and where the core settings for python are to know how and where to recognize new packages.</p>

<p>If you're using linux, make sure your <code>$PYTHONPATH</code> environment variable is set properly.</p>

<p>To do this type the following in the terminal:</p>

<pre><code>echo $PYTHONPATH
</code></pre>

<p>If you can't find it you can manually set the variable with the locations of the modules you want to find in your <code>~/.bashrc</code> file by doing the following (with the editor of your choice, I chose gedit as an example):</p>

<pre><code>sudo gedit ~/.bashrc
</code></pre>

<p>And when you're done don't forget to </p>

<pre><code>source ~/.bashrc
</code></pre>

python