Jay Bhajiyawala
Jay Bhajiyawala

Reputation: 125

ERROR: Could not find a version that satisfies the requirement os (from versions: none) in Python CICD

I'm new to Python as well as in CICD. In that I have added the below code.

Test.yml file code

jobs:
  Deploy:
    - name: Install python packages
      run: |
        python -m pip install --upgrade pip
        pip install -r /apps/requirements.txt

requirements.txt

requests
os
sys
logging
base64

Error:

ERROR: Could not find a version that satisfies the requirement os (from versions: none)
ERROR: No matching distribution found for os
Error: Process completed with exit code 1.

If I remove the -r from pip install command it'll show error and guide me to add -r in command. I have seen similar question like the one but most of them get proper solution which didn't work for me.

Thank you in advance.

Upvotes: 0

Views: 482

Answers (1)

Jay Bhajiyawala
Jay Bhajiyawala

Reputation: 125

Requirements.txt should be

requests

Because

os
sys
logging
base64

Are build-in modules in Python. So no need to add those modules in requirement.txt. So pip won't try to install build-in modules of Python.

Upvotes: 1

Related Questions