

If files are installed in the "bin" directory, you'll need to add it to your path.

The most immediate way - but the one that must be repeated every time you wish to use the package - is to manually modify your environment. To ensure Python can locate these files, we need to modify our environment. Occasionally, some files will be installed in ~/local/numexpr/2.0.1/bin as well. Python setup.py install -prefix=$INSTALL_DIRĪt this point, the package is compiled and installed in ~/local/numexpr/2.0.1/lib/python2.7/site-packages. Since we are overriding the install path to one that we can write to and that fits our management plan, we need to use the -prefix option. You can execute python setup.py -help to see what options are available. This step may vary a bit, depending on the package you are compiling. We will also load the Python package, if it hasn't already been loaded. The system installation of Python was compiled with the GNU compilers, and this will help avoid any unnecessary complications. To compile the package, we should switch to the GNU compilers. We'll call INSTALL_DIR.Įxport INSTALL_DIR=$/lib/python2.7/site-packages To build the package, we will want to first create a temporary environment variable to aid in installation. You can delete the downloaded archive now or keep it should you want to start the installation from scratch. In this case, since it's a "tar.gz" format, we can use tar to decompress and extract the contents. You can either download the file to your desktop and then upload it to OSC, or directly download it using the wget utility (if you know the URL for the file). In our example, we will use " NumExpr," a package we already provide in the system version of Python. Next, we will need to download the source code for the package we want to install.

We will do all of our work in $HOME/local/src. Gather your materialsįirst, you need to collect what you need in order to perform the installation. Please consider using conda Python package manager before you try to build Python using the method explained here.
