ProjectQ icon indicating copy to clipboard operation
ProjectQ copied to clipboard

Python 3.9.12 on OSX

Open BoltzmannEntropy opened this issue 3 years ago • 6 comments

Python 3.9.12 (main, Apr 5 2022, 01:53:17) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.

from projectq import MainEngine zsh: illegal hardware instruction python

BoltzmannEntropy avatar Sep 27 '22 20:09 BoltzmannEntropy

Hmm... this is weird as Python 3.9 should be officially supported on Apple Silicon. I will try to adapt PR #444 to give you a possible workaround.

Takishima avatar Oct 03 '22 13:10 Takishima

Could you try the following using the branch on my fork that is used for PR #444 ?

PROJECTQ_NOINTRIN=1 python3 -m pip install projectq -v

Takishima avatar Oct 03 '22 13:10 Takishima

Thank you so much for the effort. There seems to be issues with the M1 chip, what I did was to uninstall conda and install: pyenv global 3.8.10

All the best,

BoltzmannEntropy avatar Oct 04 '22 08:10 BoltzmannEntropy

So that's your first issue: Python 3.8.X is not officially supported on Apple Silicon. Please try to install a more recent Python version and try again.

Takishima avatar Oct 04 '22 20:10 Takishima

Also try downloading the code from https://github.com/Takishima/ProjectQ/tree/feature/apple-mx-processors (you can either use Git or download the ZIP file; in the latter case, unzip it somewhere on your system and then simply do python3 -m pip install path/to/unpacked/

Takishima avatar Oct 04 '22 20:10 Takishima

Did you try the latest version? Did it help?

If not, this is probably related to the fact that Python 3.8 is not officially supported on Apple Silicon and there is little we can do for the compiled C++ code (since you're compiling the code on your machine locally anyway).

Perhaps if you could post the full log of executing python3 -m pip install projectq -v I could look a bit more into this issue.

Takishima avatar Oct 26 '22 20:10 Takishima