Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 3.373s · 217.8MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 12.5s · import 3.165s · 208MB
222MB installed
● package 222MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Element objects directly (e.g., Si, Fe)
✓ from mendeleev import Si, Fe
Allows direct access to common elements as objects.
element function
✓ from mendeleev import element
✗ from mendeleev.mendeleev import element
The `element` function is exposed directly at the top-level package, not within a submodule like `mendeleev.mendeleev`.
fetch_table function
✓ from mendeleev.fetch import fetch_table
Used for retrieving bulk data as pandas DataFrames from the internal database.
This quickstart demonstrates how to import the `element` function and retrieve an element's properties such as name, atomic number, atomic weight, electronic configuration, and electronegativity.
from mendeleev import element
# Get an element by symbol
si = element("Si")
# Access its properties
print(f"Element: {si.name} ({si.symbol})")
print(f"Atomic Number: {si.atomic_number}")
print(f"Atomic Weight: {si.atomic_weight}")
print(f"Electronic Configuration: {si.econf}")
print(f"Pauling Electronegativity: {si.electronegativity(scale='pauling')}")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'mendeleev'
The 'mendeleev' library is not installed in your Python environment or the environment where you are running your code.
fixInstall the library using pip: `pip install mendeleev`
AttributeError: module 'time' has no attribute 'clock'
This error typically occurs due to an incompatibility between an older version of `sqlalchemy` (a dependency of `mendeleev`) and the Python version being used, where `time.clock()` was removed in Python 3.8 and later.
fixUpgrade `sqlalchemy` to a compatible version or ensure you are using a `mendeleev` version that has resolved this dependency issue. A common fix is `pip install --upgrade sqlalchemy` or `pip install mendeleev --upgrade` to get the latest compatible dependencies.
KeyError: 'XX'
This error occurs when trying to access an element using a symbol that does not exist in the mendeleev database, or attempting to access a property that is not defined for an element. For example, if 'XX' is not a valid element symbol or if a property like `element('Fe').non_existent_property` is requested.
fixEnsure the element symbol is correct (e.g., 'Fe' for Iron, not 'fe') and that the property you are trying to access is a valid attribute of the `Element` object (e.g., `Fe.atomic_number`, `Fe.name`). Refer to the `mendeleev` documentation for available elements and their properties.
Installing mendeleev uninstalls existing packages (e.g., NumPy)
This is a dependency conflict where `mendeleev`'s required packages (or their specific versions) clash with versions of packages already installed in your environment, leading pip to try and 'resolve' the conflict by uninstalling existing packages.
fixIt is highly recommended to install `mendeleev` in a dedicated virtual environment (e.g., using `venv` or `conda`) to avoid conflicts with other projects' dependencies. Alternatively, you can try to identify the conflicting dependency and manually upgrade or downgrade it to a version compatible with both `mendeleev` and your other libraries.
Upgrade
Version history
1.1.0latest on PyPI · released Jun 10, 2025
Audit
Dependencies
coloramarequiredRequired for command-line interface formatting.
deprecatedrequiredUsed for marking deprecated functions.
numpyrequiredFundamental package for numerical computing, used internally for data handling.
pandasrequiredUsed for tabular data manipulation, especially with bulk data access functions.
pydanticrequiredUsed for data validation and settings management.
pyfigletrequiredUsed for ASCII art in CLI output.
pygmentsrequiredUsed for syntax highlighting in CLI output.
sqlalchemyrequiredORM used for interacting with the internal SQLite database.