Cibuildwheel: OSX Permission error when installing dependencies

Created on 10 Mar 2019  路  8Comments  路  Source: joerick/cibuildwheel

See https://travis-ci.org/pytroll/aggdraw/jobs/504187990#L106 for an example. Using cibuildwheel 0.10.1

$ source ci/travis-install.sh
Collecting cibuildwheel
  Downloading https://files.pythonhosted.org/packages/dd/db/8c652a74782377db4ba40e8868f6084a431d8cbe65670d4d7e1b55e37e95/cibuildwheel-0.10.1.tar.gz
Collecting bashlex (from cibuildwheel)
  Downloading https://files.pythonhosted.org/packages/a2/c6/4f647fce8138b9b7cf948ee65ed1cef958f75a8c81903d801bbbcc6ec741/bashlex-0.13.tar.gz (60kB)
    100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 61kB 11.0MB/s 
Collecting enum34 (from bashlex->cibuildwheel)
  Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Building wheels for collected packages: cibuildwheel, bashlex
  Running setup.py bdist_wheel for cibuildwheel ... done
  Stored in directory: /Users/travis/Library/Caches/pip/wheels/81/1d/e5/035783bf1e755a03aa30ed46471afc8ab00d4963d917cac82b
  Running setup.py bdist_wheel for bashlex ... done
  Stored in directory: /Users/travis/Library/Caches/pip/wheels/5c/1c/b5/fcccabef06e01d6b958cbfec6995c755e8168c02c91e6b226c
Successfully built cibuildwheel bashlex
Installing collected packages: enum34, bashlex, cibuildwheel
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/LICENSE'
Consider using the `--user` option or check the permissions.

Any ideas?

All 8 comments

I think some changes to Pip mean this has to be sudo pip install now. Let me know if that fixes your issue and I can update the docs.

Does that should right @yannickjadoul?

@djhoese @joerick Adding sudo could indeed be a solution, but I'm not entirely sure what's wrong.

The issue and PR @joerick is referring to (#122 and #123) had/solved a problem with running pip inside cibuildwheel (when a temporary folder needed to be generated to uninstall an old version of the package, stalling the build). But the problem never was the installation of cibuildwheel, I believe.

What's more, the '/usr/local/LICENSE' file seems really weird location that should never be installed. This seems to be a problem with bashlex: https://github.com/idank/bashlex/issues/39, which recently released version 0.13, introducing this.

Oh, yeah: what can we do about it?

Euhm, I'd actually avoid sudo if possible, since the /usr/local installation of brew is not supposed to require sudo. But adding sudo is the quick solution on the user's end, though - especially on Travis CI, when you don't care about adding this /usr/local/LICENSE file.

The best solution would be to have bashlex fix this, but looking at the activity, I'm not entirely optimistic about this.

What we can do in cibuildwheel is limit the version of bashlex we depend on to bashlex<0.13 in setup.py (or bashlex!=0.13, if we hope for a newer version).

As ever, thank you @YannickJadoul for your excellent debugging!

I'll get these merged and a new version out the door shortly.

My pleasure. Glad enough I found it and managed to pin the problem ;-)

Funnily enough, bashlex just released version 0.14 with a fix, so my debugging and the fix in #128 are already outdated, by now :-D

@joerick Up to you, if you still want to revert the PR / cancel the release?

Nice timing. I restarted my failed job and it passes now.

want to revert the PR / cancel the release?

No, I'll go ahead, your version specifier is still technically correct :P

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PerretB picture PerretB  路  3Comments

thedrow picture thedrow  路  9Comments

bluesheeptoken picture bluesheeptoken  路  5Comments

mondeja picture mondeja  路  3Comments

ysig picture ysig  路  8Comments