Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WingTillDie/d38c16a150193d2e30807bf62c78118a to your computer and use it in GitHub Desktop.
Save WingTillDie/d38c16a150193d2e30807bf62c78118a to your computer and use it in GitHub Desktop.
Permanent workaround for pip install with self-signed certificate
cat >> ~/.bashrc << 'EOF'
# Permanent workaround for pip install with self-signed certificate
# The question: https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi
function pip {
case $@ in
install* ) shift 1; command pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org "$@" ;;
* ) command pip "$@" ;;
esac
}
EOF
exec bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment