You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great work you put into the hypermodern Python part - this really inspired me! So the problem I have is hopefully something to improve the framework and not just a user layer error ;-)
Problem Description
What did I do: Dot-install dependencies in a nox session of a project that uses a package from an company-internal artifactory.
Expected behavior: Successful installation
Observed behavior: A pip error about conflicting dependencies - where the versions are actually exactly matching:
nox > Creating virtual environment (virtualenv) using python3.7 in .nox\test
nox > poetry build --format=wheel
nox > pip uninstall --yes file:///C:/Users/320009833/Git/nox_err_test/dist/nox_err_test-0.1.0-py3-none-any.whl
nox > poetry export --format=requirements.txt --dev --without-hashes
nox > python -m pip install '--constraint=.nox\test\tmp\requirements.txt' file:///PATH_TO/nox_err_test/dist/nox_err_test-0.1.0-py3-none-any.whl
nox > Command python -m pip install '--constraint=.nox\test\tmp\requirements.txt' file:///PATH_TO/nox_err_test/dist/nox_err_test-0.1.0-py3-none-any.whl failed with exit code 1:
Processing c:\PATH_TO\nox_err_test\dist\nox_err_test-0.1.0-py3-none-any.whl
ERROR: Cannot install nox-err-test==0.1.0 because these package versions have conflicting dependencies.
The conflict is caused by:
nox-err-test 0.1.0 depends on ARTIFACTORY-PACKAGE==1.4.0
The user requested (constraint) ARTIFACTORY-PACKAGE==1.4.0
Additional steps & observations
Checked that the package has been successfully installed via poetry install and that it is present in the project-internal virtual environment (.venv/Lib/site-packages/)
Manually re-executed the failed pip install in the virtual environment of
nox (.nox/test/Scripts/python.exe) -> Observed the same error
the project (.venv/Scripts/python.exe) -> Success and confirmed that the package is already installed:
Requirement already satisfied: ARTIFACTORY-PACKAGE==1.4.0 in PATH_TO\nox_err_test\.venv\lib\site-packages (from nox-err-test==0.1.0) (1.4.0)
Any help would be greatly appreciated!
Details
Here is minimal working example to reproduce the error (still requiring an artifactory to download from). Note: All internals have been replaced with Uppercase words for confidentially reasons.
System setup
OS
Windows 10, 64bit
Python (system)
3.10.2 used for poetry
Python (local)
3.7.1, installed with pyenw-win and used for project
[[tool.poetry.source]]
name = "artifactory"# This name will be used in the configuration to retrieve the proper credentialsurl = "https://URL_TO_PYPI_AT_COMPANY_ARTIFACTORY/simple/"# URL used to download your packages from
[tool.poetry.dependencies]
python = "3.7.1"ARTIFACTORY-PACKAGE = "1.4.0"
[tool.poetry.dev-dependencies]
nox = "2022.1.7"nox-poetry = "0.9.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
The text was updated successfully, but these errors were encountered:
Could this be related to #398 ? The repository config is currently not forwarded to pip. So you would need to explicitly configure pip, for example by creating a pip.ini file in the %APPDATA%\pip folder.
If that doesn't help, could you post the output of the poetry export command.
Hey @cjolowicz. It surely got us in the right direction. Since I'm using in-project venvs and don't want to fiddle around with the users pip config, I decided to try to manually add the argument to the session.install call. This works! E.g. replacing
I added a function my noxfile to automatically extract the artifactory URL from the according section in the pyproject.toml to reduce duplication. E.g.:
and then adding the url as above. Thanks a lot for the help. Would it make sense to make this a feature in nox-poetry? Or do you think users should add if required (then maybe a mention in the docs would make sense)?
Dear @cjolowicz,
Thanks for the great work you put into the hypermodern Python part - this really inspired me! So the problem I have is hopefully something to improve the framework and not just a user layer error ;-)
Problem Description
Additional steps & observations
poetry install
and that it is present in the project-internal virtual environment (.venv/Lib/site-packages/
)pip install
in the virtual environment of.nox/test/Scripts/python.exe
) -> Observed the same error.venv/Scripts/python.exe
) -> Success and confirmed that the package is already installed:Any help would be greatly appreciated!
Details
Here is minimal working example to reproduce the error (still requiring an artifactory to download from).
Note: All internals have been replaced with Uppercase words for confidentially reasons.
System setup
Project layout
Installation script
Follow these steps to setup the project
noxfile
Simple executes an dot-install.
pyproject.toml
The text was updated successfully, but these errors were encountered: