Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX Permission error when installing dependencies #127

Closed
djhoese opened this issue Mar 10, 2019 · 8 comments
Closed

OSX Permission error when installing dependencies #127

djhoese opened this issue Mar 10, 2019 · 8 comments

Comments

@djhoese
Copy link

djhoese commented Mar 10, 2019

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?

@joerick
Copy link
Contributor

joerick commented Mar 10, 2019

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?

@YannickJadoul
Copy link
Member

@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: idank/bashlex#39, which recently released version 0.13, introducing this.

@YannickJadoul
Copy link
Member

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).

@joerick
Copy link
Contributor

joerick commented Mar 10, 2019

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

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

joerick added a commit that referenced this issue Mar 10, 2019
…sion

Fixing issue #127 by avoiding bashlex 0.13 in 'install_requires'
@YannickJadoul
Copy link
Member

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

@YannickJadoul
Copy link
Member

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?

@djhoese
Copy link
Author

djhoese commented Mar 10, 2019

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

@joerick
Copy link
Contributor

joerick commented Mar 10, 2019

want to revert the PR / cancel the release?

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

@joerick joerick closed this as completed Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants