Skip to content

Added notes on how to use matplotlib in pyenv #7357

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

Merged
merged 1 commit into from
Oct 31, 2016

Conversation

drewsonne
Copy link
Contributor

When you install a python environment using pyenv, you can set PYTHON_CONFIGURE_OPTS to use --enable-framework.

When you install a python environment using pyenv, you can set `PYTHON_CONFIGURE_OPTS` to use `--enable-framework`.
@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Oct 28, 2016
@tacaswell
Copy link
Member

lgtm.

Could someone who owns a mac please review and merge this?

@tacaswell tacaswell changed the title Added notes on how to use matplotlib in pyenv [mrg+1] Added notes on how to use matplotlib in pyenv Oct 28, 2016
@NelleV
Copy link
Member

NelleV commented Oct 30, 2016

Who owns a mac amongst our contributors?
@ivanov?

@QuLogic
Copy link
Member

QuLogic commented Oct 30, 2016

@mdehoon, @jenshnielsen should be able to test.

@jenshnielsen
Copy link
Member

I tried doing this. Unfortunatly it seems like the build fails for other reasons. That is probably an OSX Sierra incompatibility in pyenv

✔ ~ PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 2.7.12
Installing Python-2.7.12...

BUILD FAILED (OS X 10.12.1 using python-build 20160602)

Inspect or clean up the working tree at /var/folders/zz/yg37r3x91_d5kkj0k8x8g0cm0000gn/T/python-build.20161031132834.36637
Results logged to /var/folders/zz/yg37r3x91_d5kkj0k8x8g0cm0000gn/T/python-build.20161031132834.36637.log

Last 10 log lines:
/usr/bin/install -c -m 644 pyconfig.h /Users/jhn/.pyenv/versions/2.7.12/Python.framework/Versions/2.7/include/python2.7/pyconfig.h
building dbm using ndbm

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             dl                 imageop
linuxaudiodev      ossaudiodev        spwd
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

running build_scripts

@Carreau
Copy link
Contributor

Carreau commented Oct 31, 2016

@NelleV as requested I tried on my machine:

$ PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.5.1
Downloading Python-3.5.1.tar.xz...
-> https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
Installing Python-3.5.1...
Installed Python-3.5.1 to $HOME/.pyenv/versions/3.5.1

Succeed, test the installed python:

$ $HOME/.pyenv/versions/3.5.1/bin/python

Python 3.5.1 (default, Oct 31 2016, 10:36:04)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

So it seem to work on OS X Yosemite 10.10.5 (14F1912).

Further path/to/pip install matplotlib --pre and matplotlib import do work.

Not tested further.

@NelleV NelleV merged commit 75bf4a1 into matplotlib:master Oct 31, 2016
NelleV added a commit that referenced this pull request Oct 31, 2016
Added notes on how to use matplotlib in pyenv
@NelleV
Copy link
Member

NelleV commented Oct 31, 2016

Backported as 1759004

@NelleV
Copy link
Member

NelleV commented Oct 31, 2016

Thanks @drewsonne for this addition to the FAQ!

@drewsonne
Copy link
Contributor Author

@jenshnielsen I did this with python 3.4.3. I'll do a bunch of tests with it in different python versions, and update with which work and don't work, and a new pull request.

@drewsonne
Copy link
Contributor Author

@NelleV thanks for the approval! :-)

@QuLogic QuLogic changed the title [mrg+1] Added notes on how to use matplotlib in pyenv Added notes on how to use matplotlib in pyenv Dec 7, 2016
@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants