kw Hyun
kw Hyun

Reputation: 67

Install glfw on mac

I want to install glfw and want to use glfw with python3 to finish my homework. But there is some matters when install glfw in mac terminal.

First, I input 'pip3 install glfw' in terminal.

Second, in terminal input 'python3' into python 3.x version. and input 'import glfw'. But there gave me an error message

"Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/glfw/init.py", line 34, in raise ImportError("Failed to load GLFW3 shared library.") ImportError: Failed to load GLFW3 shared library."

Third, I input 'brew install glfw3'. And there was an error message

"Warning: glfw 3.2.1 is already installed, it's just not linked You can use brew link glfw to link this version.

Forth, I input 'brew link glfw' in terminal, it told me

"Linking /usr/local/Cellar/glfw/3.2.1... Error: Could not symlink lib/cmake/glfw3 /usr/local/lib/cmake is not writable."

So I don't know how to handling this problem, can anyone help me? Thank you!

Upvotes: 1

Views: 1446

Answers (1)

kw Hyun
kw Hyun

Reputation: 67

I tried

sudo chown -R $(whoami) $(brew --prefix)/*

in terminal.

I got this command in

Brew doctor says: "Warning: /usr/local/include isn't writable."

But I don't know why that command linked glfw library.

Upvotes: 0

Related Questions