Gambit2007
Gambit2007

Reputation: 3978

How to install a library using homebrew

I downloaded the QJson python library using brew install qjson.

What are the next steps I need to take in order to be able to work with it in PyCharm?

Upvotes: 1

Views: 2632

Answers (2)

Daniel
Daniel

Reputation: 927

As others mentioned already: It's not the best idea - at least not in general - to install python packages via your systems package manager. It's better to use pip (ideally in conjunction with virtualenvs).

Apart from that, it should be possible to use the package you installed using homebrew from pycharm / python in general. In pycharm you can switch between different interpreters (Settings / Project / Interpreter). You need to to choose the one you installed the package for with homebrew (e.g. the one in /usr/local/Cellar/python//..).

If you used brew link the currently active one should be symlinked to /usr/local/bin/python.

Upvotes: 1

Tristan
Tristan

Reputation: 2088

In pycharm you can go to the project interpreter page and click the + icon. Just like this guide how to install libraries. I think you cannot do it with homebrew and this is certainly a lot easyer.

Upvotes: 0

Related Questions