From 6983a95246a4d144b531d3c2b9313b51cd1894d2 Mon Sep 17 00:00:00 2001 From: Anja Kefala Date: Tue, 29 May 2018 13:22:16 -0400 Subject: [PATCH] virtualenv_create(libexec, "python") results in error upon install When the line was switched to the more explicit `virtualenv_create(libexec, "python3")` the package installed with any issues. Arguably, I am not as comfortable as I would like with Homebrew's relationship with Python, so maybe this reveals a larger underlying issue or there was a mistake within the original Formula. The formula is hosted [here](https://github.com/saulpw/homebrew-vd). ``` Last 15 lines from /Users/anja/Library/Logs/Homebrew/visidata/14.pip: Removing source in /private/tmp/pip-req-build-CH6VRn visidata requires Python '>=3.4' but the running Python is 2.7.10 Exception information: Traceback (most recent call last): File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 228, in main status = self.run(options, args) File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 291, in run resolver.resolve(requirement_set) File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 103, in resolve self._resolve_one(requirement_set, req) File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 262, in _resolve_one check_dist_requires_python(dist) File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/utils/packaging.py", line 55, in check_dist_requires_python '.'.join(map(str, sys.version_info[:3])),) UnsupportedPythonVersion: visidata requires Python '>=3.4' but the running Python is 2.7.10 ``` --- docs/Python-for-Formula-Authors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Python-for-Formula-Authors.md b/docs/Python-for-Formula-Authors.md index e4d50e524..7fd213b99 100644 --- a/docs/Python-for-Formula-Authors.md +++ b/docs/Python-for-Formula-Authors.md @@ -66,7 +66,7 @@ This is exactly the same as writing: ```ruby def install # Create a virtualenv in `libexec`. If your app needs Python 3, make sure that - # `depends_on "python"` is declared, and use `virtualenv_create(libexec, "python")`. + # `depends_on "python"` is declared, and use `virtualenv_create(libexec, "python3")`. venv = virtualenv_create(libexec) # Install all of the resources declared on the formula into the virtualenv. venv.pip_install resources