Skip to content

A note to pyenv users on Mac #122

@randy3k

Description

@randy3k

I am on a Mac and using pyenv to manage my python versions.

When I run PyCall on a specific python version, I got

ImportError: No module named site

I dug in the code and discovered that the python dynamic library was not detected correctly.
It turns out that one have to install python via pyenv with --enable-framework in order to have the essential file installed.

env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.4.3

I just want to make a note here for future pyenv users

Activity

stevengj

stevengj commented on Mar 13, 2015

@stevengj
Member

What precisely does --enable-framework do? Is PyCall not detecting the library, or is the library file that we need not installed?

randy3k

randy3k commented on Mar 13, 2015

@randy3k
Author

--enable-framework will create the dynamic library lib/libpython3.4.dylib which is necessary for dlopen.
see also pyenv/pyenv#99

Without it, it installs only static library lib/libpython3.4m.a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @randy3k@stevengj

        Issue actions

          A note to pyenv users on Mac · Issue #122 · JuliaPy/PyCall.jl