Skip to content

[🐛 Bug]: [py] Installing package from a local source distribution in editable mode doesn't work #16686

@cgoldberg

Description

@cgoldberg

Description

Steps to reproduce:

  • Download a published source distribution package from PyPI (i.e. selenium-4.38.0.tar.gz from https://pypi.org/project/selenium/#files)
  • Unarchive the tarball into a directory (i.e. ./selenium-4.38.0)
  • Install it in editable mode (-e/--editable) from the local directory (i.e. pip install -e ./selenium-4.38.0)

Results:

The package succesfully builds (if you have a Rust toolchain installed) and installs, and you can import the main module... but no attributes or packages inside it are available.

If you install in non-editable mode (i.e. pip install ./selenium-4.38.0), everything works fine.

Environment:

  • operating system: Linux (Debian 13) or Windows (11)
  • python: 3.14
  • pip: 25.3

Note: this is low priority, but I would like to figure out why it doesn't work

Reproducible Code

pip install --editable ./selenium

Debugging Logs

(venv) $ pip list | grep selenium
selenium          4.38.0      C:\Users\corey.goldberg\code\selenium-4.38.0

(venv) $ python
Python 3.14.1 (tags/v3.14.1:57e0d17, Dec  2 2025, 14:05:07) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> selenium.__version__
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    selenium.__version__
AttributeError: module 'selenium' has no attribute '__version__'
>>> from selenium import webdriver
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    from selenium import webdriver
  File "C:\Users\corey.goldberg\code\selenium-4.38.0\selenium\webdriver\__init__.py", line 18, in <module>
    from selenium.webdriver.chrome.options import Options as ChromeOptions  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\corey.goldberg\code\selenium-4.38.0\selenium\webdriver\chrome\options.py", line 20, in <module>
    from selenium.webdriver.chromium.options import ChromiumOptions
  File "C:\Users\corey.goldberg\code\selenium-4.38.0\selenium\webdriver\chromium\options.py", line 23, in <module>
    from selenium.webdriver.common.options import ArgOptions
  File "C:\Users\corey.goldberg\code\selenium-4.38.0\selenium\webdriver\common\options.py", line 23, in <module>
    from selenium.common.exceptions import InvalidArgumentException
ModuleNotFoundError: No module named 'selenium.common.exceptions'

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsI-defectSomething is not working as intendedOS-linux

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions