Skip to content

vpype[all] can't be installed on Mac OSX on ARM based Macs (M1) #320

@theomega

Description

@theomega

Edit by @abey79:

Thanks to MacPorts now properly supporting pyside2 and its dependences (in particular qt5-qtwebengine, thanks @chrstphrchvz!), this issue is now resolved. The install procedure is as follows:

Install/upgrade MacPorts

If you don't have MacPorts installed, install it from here. You will need to install Xcode if you haven't already.

If you had MacPorts previously installed, make sure its package database is up-to-date:

sudo port selfupdate
sudo port upgrade outdated

Install required packages

sudo port install python39 py39-shapely py39-scipy py39-numpy py39-pyside2

(optional) Make Python 3.9 the default interpreter

This is not strictly necessary, but this step will make python point towards MacPorts' Python 3.9.x.

sudo port select --set python python39

Create a virtual environment for vpype

cd path/where/the/venv/should/be
/opt/local/bin/python3.9 -m venv vpype_venv --system-site-packages

Important: note the use of --system-site-packages. This will make the MacPorts-installed package (in particular pyside2) available to the virtuel environment. This is critically important because pip is unable to install PySide2 on arm64 Macs (this will likely never change).

Using the full path for the python interpreter is not needed if python points to the right interpreter (ie. you did the previous step and your PATH is not messed up.

Activate the virtual environment and install vpype

source vpype_venv/bin/activate
pip install "vpype[all]"

Check that the install was successful:

vpype random show

original message by @theomega

This is very likely not vpypes fault, but you can't install vpype using pip on Mac OSX if your machine is one of the new m1 based arm machines.

Reason is that the PySides2 package can't be installed on these machines as there is no official port of QT python bindings for the M1 yet.

Error Message:

ERROR: Cannot install vpype[all]==1.4.0, vpype[all]==1.5.0, vpype[all]==1.5.1, vpype[all]==1.6.0 and vpype[all]==1.7.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    vpype[all] 1.7.0 depends on PySide2<6.0.0 and >=5.15.2; extra == "all"
    vpype[all] 1.6.0 depends on PySide2<6.0.0 and >=5.15.2
    vpype[all] 1.5.1 depends on PySide2<6.0.0 and >=5.15.2
    vpype[all] 1.5.0 depends on PySide2<6.0.0 and >=5.15.2
    vpype[all] 1.4.0 depends on PySide2<6.0.0 and >=5.15.2

Manual install of PySide2:

$ pip install PySide2
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2

Some more information can be found on the QT Forum here:
https://forum.qt.io/topic/124289/mac-m1-pyside-2-6-can-t-install-lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions