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

python_requirements environment constraints #2078

Open
bvolkmer opened this issue Dec 6, 2024 · 1 comment
Open

python_requirements environment constraints #2078

bvolkmer opened this issue Dec 6, 2024 · 1 comment

Comments

@bvolkmer
Copy link

bvolkmer commented Dec 6, 2024

If I have or example, a requirements.txt with the following content:

pywin32==308 ; platform_system == 'Windows'

It will try to install the package and fail because it is not available on Linux.
But normally, pip (at least 24.3.1) does succeed with

Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment

So I suspect that the requirement.txt file is modified in the process.

@meatballhat
Copy link
Contributor

@bvolkmer You are absolutely right. Although the original requirements.txt is not modified, there is a decent amount of fiddling going on. If it's an option, I'd recommend using a separate file specifically for the Cog environment such as python_requirement: requirements-cog.txt which excludes the non-Linux dependencies.

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

2 participants