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

Could not find a version that satisfies the requirement pytest-playwright==0.6.1 #262

Closed
dbeilin opened this issue Nov 26, 2024 · 1 comment

Comments

@dbeilin
Copy link

dbeilin commented Nov 26, 2024

The latest pytest verison gives me the following error:

root@1b2d2cc7478f:/# pip3 install pytest-playwright==0.6.1
Collecting pytest-playwright==0.6.1
  Downloading pytest_playwright-0.6.1.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package pytest-playwright produced metadata for project name unknown. Fix your #egg=pytest-playwright fragments.
Discarding https://files.pythonhosted.org/packages/4e/a9/2054793533bd69b4e0c0ae7a807edf8d6d859cd6ee55ce332a29c4446a0f/pytest_playwright-0.6.1.tar.gz#sha256=f4ccbed1ce8d37a945c010811aa9eb9aa7120eea7cad29620b90d5389fd8caf7 (from https://pypi.org/simple/pytest-playwright/) (requires-python:>=3.9): Requested unknown from https://files.pythonhosted.org/packages/4e/a9/2054793533bd69b4e0c0ae7a807edf8d6d859cd6ee55ce332a29c4446a0f/pytest_playwright-0.6.1.tar.gz#sha256=f4ccbed1ce8d37a945c010811aa9eb9aa7120eea7cad29620b90d5389fd8caf7 has inconsistent name: filename has 'pytest-playwright', but metadata has 'unknown'
ERROR: Could not find a version that satisfies the requirement pytest-playwright==0.6.1 (from versions: 0.0.2, 0.0.3, 0.0.4, 0.0.4.1, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.1)
ERROR: No matching distribution found for pytest-playwright==0.6.1

Reproduce:

  1. docker run -ti --rm mcr.microsoft.com/playwright:jammy bash
  2. apt update && apt install -y python3-pip
  3. pip3 install pytest-playwright==0.6.1
  4. See error

The Python version in the above case is 3.10.12:

root@1b2d2cc7478f:/# python3 --version
Python 3.10.12

With that being said, I wasn't able to reproduce this locally on my Mac:

> uv venv ~/.uv_venvs/pytest --python=3.10.12
Using CPython 3.10.12
Creating virtual environment at: /Users/dbeilin/.uv_venvs/pytest
Activate with: source /Users/dbeilin/.uv_venvs/pytest/bin/activate
> source /Users/dbeilin/.uv_venvs/pytest/bin/activate
> uv pip install pytest-playwright==0.6.1
Using Python 3.10.12 environment at /Users/dbeilin/.uv_venvs/pytest
Resolved 19 packages in 18ms
Installed 19 packages in 22ms
 + certifi==2024.8.30
 + charset-normalizer==3.4.0
 + exceptiongroup==1.2.2
 + greenlet==3.1.1
 + idna==3.10
 + iniconfig==2.0.0
 + packaging==24.2
 + playwright==1.49.0
 + pluggy==1.5.0
 + pyee==12.0.0
 + pytest==8.3.3
 + pytest-base-url==2.1.0
 + pytest-playwright==0.6.1
 + python-slugify==8.0.4
 + requests==2.32.3
 + text-unidecode==1.3
 + tomli==2.1.0
 + typing-extensions==4.12.2
 + urllib3==2.2.3

So is it an Ubuntu thing, or am I doing something wrong?
Thanks 🙏🏻

@mxschmitt
Copy link
Member

mxschmitt commented Nov 26, 2024

Should be fixed by #261 as part of 0.6.2

Note: We recommend to pin the Docker image to a specific version. See here for more information.

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