Operations > Computing > FAQ

Custom Python Module or Python Installs

The pip command (or pip3 for some 3.x version of python) can install to your home directory via:

$ pip3 install --user pandas
...

virtualenv

Local python module installs are possible using virtualenv on the Linux Lab systems. In a terminal, run the following shell commands:

$ cd
$ mkdir python-stuff
$ cd python-stuff
$ virtualenv-3 .
...
$ ./bin/pip3 install pandas
...

the last of which may take some time to compile. See the pip docs for more information on searching for and installing packages.

If you need a specific version of python build and install it under your home directory:

$ wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
$ wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz.asc
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys AA65421D
$ gpg --verify Python-3.6.5.tgz.asc
gpg: Signature made Wed 28 Mar 2018 03:28:12 AM PDT using RSA key ID AA65421D
gpg: Good signature from "Ned Deily (Python release signing key) "
...
$ tar xzf Python-3.6.5.tgz
$ cd Python-3.6.5
$ unset CFLAGS
$ ./configure --prefix=$HOME/python-3.6.5 && make && make install

Scripts can now use the /homes/urlogin/python-3.6.5/bin/python3 path to reference that custom install.

Modern Compiler

Software may need a modern compiler; this can be enabled by running your shell under the devtoolset-7 software collection:

$ which gcc
/usr/bin/gcc
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
...

$ scl enable devtoolset-7 "$SHELL"
$ which gcc
/opt/rh/devtoolset-7/root/usr/bin/gcc
$ gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
...

$ 

And then compile (and possibly use) the software under that shell.

   
ECE logo