Home Apple python – Configure poetry to create x86 setting

python – Configure poetry to create x86 setting

0
python – Configure poetry to create x86 setting

[ad_1]

My python mission has a dependency that isn’t obtainable for apple silicon (I exploit a Macbook Professional M2). A plain pip set up will run into an error:

putting in pyqt-qt5 (5.15.2): Failed
RuntimeError
Unable to search out set up candidates for pyqt-qt5 (5.15.2)

What works

Utilizing conda to deal with the digital setting, I can implement the x86 model of the dependencies like so:

CONDA_SUBDIR=osx-64 conda create -n my-intel-env python=3.11 -y
conda activate my-intel-env
conda env config vars set CONDA_SUBDIR=osx-64
conda deactivate
conda activate my-intel-env
pip set up "poetry==1.5.1"
poetry set up --with dev
...
  • Putting in pymiscutils (0.3.14)
  • Putting in pyqt5 (5.15.9)
  • Putting in requests-oauthlib (1.3.1)
...

What does not

Nonetheless, I would wish to ditch conda and use poetry solely, i.e., additionally for creating the venv. For this, I’ve a poetry.toml file within the mission root:

[virtualenvs]
in-project = true

When working poetry set up without having a venv activated, this can create a .venv folder contained in the mission root, and set up all dependencies into it, which is what I need. Nonetheless, it fails in the identical approach as described on the high.

How can I configure poetry to make use of x86, equally to how I did it for conda?

[ad_2]