Pip error after updating to Python 3.7.0

(Patrick Linskey) #1


I maintain via a GitHub-hosted tap a little GitHub helper tool. I made some simple application-logic changes to it over the weekend and published the new version, but then ran into trouble on both of my laptops when upgrading from 0.2 to 0.3.

No dependencies in my bundle changed, but upgrading triggered python@3 to upgrade to version 3.7.0.

Once the Python upgrade completed, the upgrade of my component executed system "python3", "-mpip", "install", "-r", "requirements.txt". This has worked historically, but on both my machines, I got the following error:

Installing collected packages: urllib3, idna, chardet, certifi, requests, six, cookies, responses, tabulate
Could not install packages due to an EnvironmentError: [Errno 1] Operation not permitted: '/usr/local/lib/python3.7/site-packages/urllib3'

/usr/local is owned by my userid, and permissions are as you would expect (drwxrw-rw-). Before execution of the brew install, the urllib3 directory in question does not exist, and the site-packages directory has the same permissions as above.

If I manually run python3 -mpip install -r <path/to/requirements.txt>, everything installs properly, and subsequent runs of brew install pcl/git-pull-request/git-pull-request completes successfully.

I wonder if something has changed in the way that Python gets executed in recent versions of brew or Python.

Has anyone run into similar issues lately?



(Patrick Linskey) #2

This has been reproduced on a number of additional machines. I’ve filed a bug here.

(Patrick Linskey) #3

I’ve worked around the issue by refactoring how my formula installs dependencies.