Make Python built with jhbuild work on OSX

background

Refer to GTK + Download: Mac OS X I built Gimp with jhbuild.

Make Python built with jhbuild work on OSX

If you do the following normally, you will be addicted to various things later.

~/.local/bin/jhbuild build python

At least, it's a good idea to start your PATH only with / bin: / usr / bin: / sbin.

If you don't use Homebrew openssl

Even if you pull out / usr / local / bin in PATH and specify ~ / gtk / inst in prefix

It will detect openssl in / usr / local / include and / usr / local / lib and try to use it, so delete the link.

brew unlink openssl

When using Homebrew openssl

Python itself uses Homebrew's openssl You can create and run it, but while installing other Gtk + related libraries Quite annoying things happen. (I don't recommend this method because it happened)

jhbuild shell

Enter the shell with

When executing python configure

CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./configure --prefix ~/gtk/inst --libdir ~/gtk/inst/lib --enable-shared

Add CFLAGS and LDFLAGS as in.

Change python link settings

Since the Python itself is set to refer to Apple's genuine Python library, Change this with install_name_tool.

cd ~/gtk/inst/bin
install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python ~/gtk/inst/lib/libpython2.7.dylib python

Tragedy that happens if you do not do this work

--Import md5 cannot be done without clearing around openssl --When I import some module, the thread dies with an error.

Related posts

-gtk --When no font is displayed with the fc-list command on Mac --Qiita

Related article

-I wanted to make a gimp plugin on OSX and built gimp from source -To enable Python-Fu on the official Gimp-2.10.app for macOS

Recommended Posts

Make Python built with jhbuild work on OSX
Put Python 2.7.x on Mac OSX 10.15.5 with pyenv
Make a breakpoint on the c layer with python
Make Puyo Puyo AI with Python
Search engine work with python
Make Echolalia LINEbot with Python + heroku
Make apache log csv with python
Kivy + Python3 on OSX environment maintenance
Make a recommender system with python
Notes on using rstrip with python.
Let's make a graph with python! !!
Getting started with Python 3.8 on Windows
When matplotlib doesn't work with python2.7
[Python] Make pip available on macOS
[Memo] Tweet on twitter with python
Make the Python console covered with UNKO
Don't work Python with OpenCV on AMD Ryzen CPU on WSL2 Ubuntu 18.04 And 20.04
Let's make a shiritori game with Python
Run servo with Python on ESP32 (Windows)
Fractal to make and play with Python
A memo with Python2.7 and Python3 on CentOS
Map rent information on a map with python
Follow active applications on Mac with Python
How to work with BigQuery in Python
[C] [python] Read with AquesTalk on Linux
Virtualenv does not work on Python3.5 (Windows)
Let's make a voice slowly with Python
scipy stumbles with pip install on python 2.7.8
Make pypy submission easier with atcoder-cli (python)
Download files on the web with Python
Build Python environment with Anaconda on Mac
[Python] Let's make matplotlib compatible with Japanese
Create an OpenCV3 + python3 environment on OSX
Let's make a web framework with Python! (1)
Make a desktop app with Python with Electron
Let's make a Twitter Bot with Python!
Installing PIL with Python 3.x on macOS
Let's make a web framework with Python! (2)
Working with GPS on Raspberry Pi 3 Python
[Improve work efficiency with Python] Request: Make all Excel PDFs in this folder.
Getting started with Python with 100 knocks on language processing
Make Python scripts into Windows-executable .exes with Pyinstaller
Make a Twitter trend bot with heroku + Python
Strategy on how to monetize with Python Java
[Python] Make a game with Pyxel-Use an editor-
Build python environment with pyenv on EC2 (ubuntu)
I want to make a game with Python
[Ansible] Install dnf on Centos7 with Python3 interpreter
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Hello World with nginx + uwsgi + python on EC2
Try to make a "cryptanalysis" cipher with Python
Make OpenCV3 available from python3 installed with pyenv
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
Make your own module quickly with setuptools (python)
Enjoy electronic work with GPIO on Raspberry Pi
[Python] Make a simple maze game with Pyxel
Folium: Visualize data on a map with Python
Make slackbot only react on specific channels (Python slackbot)
How to install OpenGM on OSX with macports
Jinja2 2.9.6 does not work on Lambda Python 3 series
Try working with Mongo in Python on Mac