Last active
August 29, 2015 14:23
-
-
Save jdblischak/035449e1469664810536 to your computer and use it in GitHub Desktop.
Testing pysam installation with Python3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for VERSION in 3.3.6 3.4.0 3.4.1 3.4.2 3.4.3 | |
do | |
bash install-python.sh $VERSION | |
bash install-pysam.sh $VERSION | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install pysam for a given Python3 version. | |
# Requires a pre-created virtual environment in the current working directory | |
# named ve#.#.# | |
# Input is version number, e.g. 3.4.3 | |
# usage: bash install-pysam.sh #.#.# | |
VERSION=$1 | |
echo "Installing pysam for Python$VERSION" | |
source ve$VERSION/bin/activate | |
pip install pysam | |
python -c "import pysam" | |
deactivate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Python3 from source and creates a virtual environment. | |
# Input is version number, e.g. 3.4.3 | |
# usage: bash install-python.sh #.#.# | |
VERSION=$1 | |
echo "Installing Python$VERSION" | |
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz --no-check-certificate | |
tar xzf Python-$VERSION.tgz | |
cd Python-$VERSION | |
./configure --prefix=`pwd` | |
make | |
make test | |
make install | |
cd .. | |
virtualenv -p Python-$VERSION/bin/python3 ve$VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment