Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Errors installing packages dependent on python when pyenv installed #44747

Closed
ndevenish opened this issue Oct 8, 2015 · 1 comment
Closed
Assignees
Labels

Comments

@ndevenish
Copy link

I've got pyenv installed and activated, through homebrew. I had activated a python3 environment, when I ran homebrew to install some things - crucially, this means that the python executable in the PATH works, but just shows an error (with non-zero return value). Firstly, when it attempts to get the python user packages in python.rb:

def self.user_site_packages(python)
    Pathname.new(`#{python} -c "import site; print(site.getusersitepackages())"`.chomp)
end

It appears to run python without checking the success of the return - which failed, which leads to messages like these (from e.g. caveats.rb:87@b33f0):

If you need Python to find bindings for this keg-only formula, run:
  echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth
  mkdir -p 
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> homebrew.pth

e.g. spurious and incorrect commands.

Worse, I seem to have gotten several of the "python not available" messages during installation of packages, meaning I now have no idea if the package installation worked or not, because homebrew threw no errors.

I'd probably suggest checking the return value of python calls, or at least checking something works on startup - brew doctor won't even pick up this issue, but ideally installing new packages would fail also.

@DomT4 DomT4 added the python label Oct 9, 2015
@tdsmith tdsmith self-assigned this Nov 24, 2015
@apjanke apjanke modified the milestone: Clear out Legacy May 3, 2016
@MikeMcQuaid
Copy link
Member

We don't support using pyenv. We'll accept PRs for this but we're not actively working on it at this time.

@Homebrew Homebrew locked and limited conversation to collaborators Aug 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants