Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install for multi platforms. markers and sys_platform is ignored #6354

Open
danrossi opened this issue Mar 6, 2025 · 1 comment

Comments

@danrossi
Copy link

danrossi commented Mar 6, 2025

This is an old issue that was supposably fixed but when configuring mac wheels on windows it's still trying to install them and run into errors like this when running pipenv install

ERROR: cffi-1.16.0-cp312-cp312-macosx_11_0_universal2.whl is not a supported

And vice versa on mac I have to remove the windows selected package for the same reason.

On mac having these two lines in the file fails from a supposed fix.

Pillow = { version = "*", markers="sys_platform == 'win32'" }
cffi = { version = "*", markers="sys_platform == 'win32'" }

With errors like

    raise InstallationError(msg)
pipenv.patched.pip._internal.exceptions.InstallationError: Invalid requirement: 'cffi*': Expected end or semicolon (after name and no valid version specifier)

Full pipenv file

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
starlette = "*"
starlette-jwt = "*"
pystray = "*"
Events = "*"
altgraph = "*"
anyio = "==4.4.0"
asgiref = "*"
click = "*"
colorama = "*"
future = "*"
h11 = "*"
httptools = "*"
idna = "*"
pyinstaller-hooks-contrib = "*"
python-dotenv = "*"
pywin32-ctypes = "*"
six = "*"
sniffio = "*"
watchgod = "*"
MarkupSafe = "*"
PyYAML = "*"
icnsutil = "*"
macholib = "*"
pefile = "*"
pyjwt = "*"
cryptography = "*"
appdirs = "*"
pyinstaller = "*"
uvicorn = {extras = ["standard"], version = "*"}
python-decouple = "*"
pyinstaller-versionfile = "*"
toml = "*"
boto3 = "*"
rich = "*"
gitpython = "*"
wheel-filename = "*"
delocate = "*"
Pillow = { version = "*", markers="sys_platform == 'win32'" }
cffi = { version = "*", markers="sys_platform == 'win32'" }
pyobjc = { version = "*", markers="sys_platform == 'darwin'" }
pillow_mac = {file = "build/mac/Pillow-10.1.0-cp312-cp312-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'" }
cffi_mac = {file = "build/mac/cffi-1.16.0-cp312-cp312-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'"}
websockets_mac = {file = "build/mac/websockets-12.0-cp312-cp312-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'"}
[dev-packages]

[requires]
python_version = "3.13"
@danrossi
Copy link
Author

danrossi commented Mar 7, 2025

I'm not sure if this is the same issue. I have git pipenv installed. These local universal2 wheels pipenv is trying to install the pip version not the local wheel when running pipenv install from a fresh shell. And so was reporting not a fat binary and couldn't figure out why. For the websockets wheel mostly.

pillow_mac = {file = "build/mac/Pillow-11.1.0-cp313-cp313-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'" }
cffi_mac = {file = "build/mac/cffi-1.17.1-cp313-cp313-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'"}
websockets_mac = {file = "build/mac/websockets-15.0.1-cp313-cp313-macosx_11_0_universal2.whl", markers="sys_platform == 'darwin'"}

Running the wheel install manually worked. Lipo reported the included libraries as fat binaries.

pipenv run pip install --force-reinstall build/mac/websockets-15.0.1-cp313-cp313-macosx_11_0_universal2.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant