Python Need help installing python 3.9 matplotlib FreeBSD 13.1-p2

Hi,

I'm trying to install matplotlib to use it with jupyter notebook. I'm using pip in a virtual environment to install it. Jupyter install fine but I'm getting an error trying to install matplotlib. pip complain about building FreeType 2.

I have freetype 2 install on my system but an older version. When I'm trying to install freetype-py I get the same kind of error.
It look like it would need to use GCC instead of CLANG put I'm more a user and don't know much about python.

Code:
Building freetype in build/freetype-2.6.1
      GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2.
      Please try
     
        MAKE=<GNU make command name> ./configure
     
      or
     
        MAKE="makepp --norc-substitution" ./configure
 
When pip fails you need to use the package/port,
 
I installed the port but I don't know how to mix the virtual environment and the local package.
 
Ok merci Alain,
I got it and it work. I change the
Code:
include-system-site-packages = true
in pyenv.cfg and now everything work!

Serge
 
This is a bit outdated, but having faced similar difficulties with FreeBSD 14.0-RELEASE, Python 3.9 from pkg, I thought it would be helpful to share here.
Alain's suggestion works for installing all required packages, but jupyter will not run because can not connect to the kernel.
Therefore, and to solve it, one has to install the ipykernel on the virtualenv.

Code:
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
 
Back
Top