Skip to content

fix/allow-pip-to-fetch-runtime-dependencies-during-isolated-install#48

Open
prasad-sawantdesai wants to merge 2 commits intoiterorganization:developfrom
prasad-sawantdesai:fix/allow-pip-to-fetch-runtime-dependencies-during-isolated-install
Open

fix/allow-pip-to-fetch-runtime-dependencies-during-isolated-install#48
prasad-sawantdesai wants to merge 2 commits intoiterorganization:developfrom
prasad-sawantdesai:fix/allow-pip-to-fetch-runtime-dependencies-during-isolated-install

Conversation

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator

Removed --no-index from the pip install command so that runtime dependencies like numpy can be fetched from PyPI.
when we have AL_PYTHON_BINDINGS=ON in the cmake configuration, --no-index was restricting pip to use dependencies from local folder, it was causing install error like below.

Processing ./dist/imas_core-5.6.1.dev4-cp311-cp311-linux_x86_64.whl
INFO: pip is looking at multiple versions of imas-core to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement numpy (from imas-core) (from versions: none)
ERROR: No matching distribution found for numpy

*Note : Tested it locally but need to confirm this behavior on all the platforms

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator Author

discussion: #21

@prasad-sawantdesai prasad-sawantdesai marked this pull request as draft April 13, 2026 06:58
@maarten-ic
Copy link
Copy Markdown
Contributor

The problem (and why I submitted #21) was because Bartek Palak wanted to use the easybuild config for a released version of imas-core on the EF Gateway. It would download the Python package from PyPI instead of the just-built python package during the install step.

The problem is listed here: https://stackoverflow.com/questions/62929339/pip-install-find-links-search-order. It seems that when a version of a package is available both on PyPI and in a folder pointed to with --find-links, pip will prioritize the PyPI package.

It probably works with your local tests right now, because imas_core-5.6.1.dev4-cp311-cp311-linux_x86_64.whl has a newer version than is available on PyPI...

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator Author

The problem (and why I submitted #21) was because Bartek Palak wanted to use the easybuild config for a released version of imas-core on the EF Gateway. It would download the Python package from PyPI instead of the just-built python package during the install step.

The problem is listed here: https://stackoverflow.com/questions/62929339/pip-install-find-links-search-order. It seems that when a version of a package is available both on PyPI and in a folder pointed to with --find-links, pip will prioritize the PyPI package.

It probably works with your local tests right now, because imas_core-5.6.1.dev4-cp311-cp311-linux_x86_64.whl has a newer version than is available on PyPI...

Thanks @maarten-ic

@prasad-sawantdesai
Copy link
Copy Markdown
Collaborator Author

Here, --no-deps is added to the pip install step so pip installs only the local package and does not try to install runtime dependencies from the dist/ folder when using isolation. This matches the build step, which also uses --no-deps.

@prasad-sawantdesai prasad-sawantdesai marked this pull request as ready for review April 13, 2026 12:19
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

Successfully merging this pull request may close these issues.

2 participants