Welcome to Centmin Mod Community
Register Now

how to install pyftsubset in Alma8?

Discussion in 'Forum software usage' started by modder, Dec 2, 2023.

  1. modder

    modder Member

    109
    16
    18
    Dec 6, 2019
    Ratings:
    +25
    Local Time:
    8:18 AM
  2. modder

    modder Member

    109
    16
    18
    Dec 6, 2019
    Ratings:
    +25
    Local Time:
    8:18 AM
    Ok. Searched the forum, found this:
    Run the commands:
    Code (Text):
    pip3 install fonttools
    pip3 install Brotli
    pip3 install Zopfli


    Then run the following commands to locate the program:
    Code (Text):
    updatedb
    locate pyftsubset
     
  3. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    10:18 AM
    Nginx 1.25.x
    MariaDB 10.x
    For Almalinux/Rocky Linux 8, python 3.6 is default and the linked above steps are applicable if you want to isolate your python installed software in virtual environment separate from system wide environment

    Install virtualenv and create a directory to house the python projects at /home/python_projects. You're telling virtualenv to create an environment with default python 3.6 binary /usr/bin/python3.6 and name the virtual environment as fonttools. Then using source command to activate the environment
    Code (Text):
    pip install virtualenv
    mkdir -p /home/python_projects
    cd /home/python_projects
    virtualenv -p /usr/bin/python3.6 fonttools
    source fonttools/bin/activate


    With the fonttools environment activated run the commands to update pip and install fonttools and dependencies.
    Code (Text):
    # pip doesn't like ccache so disable it
    export CC='gcc'
    export CXX="g++"
    
    # pip needs a tmp directory that doesn't have noexec restrictions
    mkdir -p /home/piptmp
    chmod 1777 /home/piptmp
    export TMPDIR=/home/piptmp
    
    python3.6 -m pip install -U pip
    pip --version
    python3.6 -m pip install fonttools --verbose --force
    python3.6 -m pip install zopfli --verbose --force
    python3.6 -m pip install brotli --verbose --force

    You can find where pyftsubset was installed via locate command and you can see it was
    Code (Text):
    updatedb
    locate pyftsubset
    /home/python_projects/fonttools/bin/pyftsubset
     
  4. modder

    modder Member

    109
    16
    18
    Dec 6, 2019
    Ratings:
    +25
    Local Time:
    8:18 AM
    Thanks. What if I've already installed it with the commands in my previous post? How do I remove it before following your instructions?

    Or, is it really necessary to isolate the environment?
     
  5. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    10:18 AM
    Nginx 1.25.x
    MariaDB 10.x
    just run commands but instead use uninstall
    Code (Text):
    pip3 uninstall fonttools
    pip3 uninstall Brotli
    pip3 uninstall Zopfli
    

    Depends on what you're installing. For these 3 probably be fine, but getting into habit of virtual environments makes it cleaner. Google search for python virtualenv and read up on why and how.