Nothing in $HOME is in sys.path (for python3 -m pheweb) or $PATH (for pheweb) by default, so the two main approaches are:
sudo pip3 install pheweb: not acceptable for commoners on clusters.
install somewhere else and modify ~/.bashrc:
miniconda: occasionally conflicts with system python in very confusing ways, but is well-documented and helps with modifying ~/.bashrc. Also, it's 400MB, but that shouldn't be a problem for anyone using PheWeb.
try to pip3 install pheweb. if it succeeds, exit 0
download miniconda to ~/.pheweb/miniconda3/
make ~/bin/pheweb which does . ~/.pheweb/miniconda3/bin/activate
put export PATH=$HOME/bin:$PATH in .bashrc. (alternatively, use ~/.pheweb/bin)
pyinstaller: will require some changes to PheWeb, but then we can just tell users to wget -o ~/bin/pheweb https://... and add that to their $PATH.
~/.local: often leads to odd errors even on a new python3 and OS due to its attempt to fall back on system packages.
Ubuntu 14 (py3.4) lacks pip and python3 -m pip.
~/venv3: fewer odd errors than ~/.local, but requires virtualenv to be installed properly, which is a challenge on some systems. Can use . ~/venv3/bin/activate to modify path.
homebrew/linuxbrew: the only option here that has a chance of breaking more than just the python install. If users have it, pip3 install pheweb will work, and if they don't, I'm not going to recommend it.
sudo pip, ~/.local, and ~/virtualenv3 rely on the system pip3, which has various problems depending on the OS and python version:
On our cluster, we have a completely broken /usr/local/bin/pip3 at the front of the path for unknown reasons, so we need to use python3 -m pip. python3 -m pip is installed on snowwhite but not browser. python3 -m ensurepip is not available on either, since Ubuntu prefers sudo apt-get install python3-pip. None of these give good error mesages.
Ubuntu 14.04 has a broken version of python3 -m venv which must be worked-around with:
A fresh Ubuntu 16.10 server needs apt-get install python3-venv (or other solutions?) in order to run python3 -m venv ~/venv (unless you add --without-pip, but then you haven't gained anything), and I can't figure out how to check whether python3-venv is installed. ( dpkg-query -L python3-venv?)
Getting
pheweb
installed on$PATH
Nothing in
$HOME
is insys.path
(forpython3 -m pheweb
) or$PATH
(forpheweb
) by default, so the two main approaches are:sudo pip3 install pheweb
: not acceptable for commoners on clusters.~/.bashrc
:miniconda
: occasionally conflicts with system python in very confusing ways, but is well-documented and helps with modifying~/.bashrc
. Also, it's 400MB, but that shouldn't be a problem for anyone using PheWeb.curl https://statgen.github.io/pheweb/install.sh | bash
:pip3 install pheweb
. if it succeeds,exit 0
~/.pheweb/miniconda3/
~/bin/pheweb
which does. ~/.pheweb/miniconda3/bin/activate
export PATH=$HOME/bin:$PATH
in.bashrc
. (alternatively, use~/.pheweb/bin
)pyinstaller
: will require some changes to PheWeb, but then we can just tell users towget -o ~/bin/pheweb https://...
and add that to their$PATH
.~/.local
: often leads to odd errors even on a new python3 and OS due to its attempt to fall back on system packages.pip
andpython3 -m pip
.~/venv3
: fewer odd errors than~/.local
, but requires virtualenv to be installed properly, which is a challenge on some systems. Can use. ~/venv3/bin/activate
to modify path.homebrew
/linuxbrew
: the only option here that has a chance of breaking more than just the python install. If users have it,pip3 install pheweb
will work, and if they don't, I'm not going to recommend it.sudo pip
,~/.local
, and~/virtualenv3
rely on the systempip3
, which has various problems depending on the OS and python version:On our cluster, we have a completely broken
/usr/local/bin/pip3
at the front of the path for unknown reasons, so we need to usepython3 -m pip
.python3 -m pip
is installed on snowwhite but not browser.python3 -m ensurepip
is not available on either, since Ubuntu preferssudo apt-get install python3-pip
. None of these give good error mesages.Ubuntu 14.04 has a broken version of
python3 -m venv
which must be worked-around with:A fresh Ubuntu 16.10 server needs
apt-get install python3-venv
(or other solutions?) in order to runpython3 -m venv ~/venv
(unless you add--without-pip
, but then you haven't gained anything), and I can't figure out how to check whetherpython3-venv
is installed. (dpkg-query -L python3-venv
?)