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

Error installing dependencies using poetry #362

Closed
mazdakb opened this issue Feb 24, 2021 · 5 comments · Fixed by #366
Closed

Error installing dependencies using poetry #362

mazdakb opened this issue Feb 24, 2021 · 5 comments · Fixed by #366
Assignees
Labels
Milestone

Comments

@mazdakb
Copy link

mazdakb commented Feb 24, 2021

After cloning the project, I get the following error when when executing poetry install -E docs:

poetry install -E docs
Installing dependencies from lock file

SolverProblemError

Because mkdocstrings (0.14.0 git rev master) depends on mkdocs-autorefs (>=0.1,<0.2) which doesn't match any versions, mkdocstrings is forbidden.
So, because copier depends on mkdocstrings (0.14.0 git rev master), version solving failed.

at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/solver.py:241 in _solve
    237│             packages = result.packages
    238│         except OverrideNeeded as e:
    239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
    240│         except SolveFailure as e:
  → 241│             raise SolverProblemError(e)
    242│ 
    243│         results = dict(
    244│             depth_first_search(
    245│                 PackageNode(self._package, packages), aggregate_package_nodes

Steps to reproduce

  1. Clone the project fresh
  2. Go into the cloned project root and run poetry install -E docs or poetry install

System Specs

  • OS: macOS 11.2.1
  • Poetry base Python interpreter: v3.9.1 (pyenv)
  • Poetry version 1.1.4 (pipx)
@mazdakb
Copy link
Author

mazdakb commented Feb 24, 2021

I could get around it by fixing the version of mkdocs-autorefs by putting mkdocs-autorefs = "^0.1.0" in pyproject.toml. I think the problem is with dependencies declaration in mkdocstrings where the version for mkdocs-autorefs is set as ^0.1 whereas the version for that library in PyPi is designated as 0.1.0. What I am not sure about is why does fixing the version in copier's dependencies fixes the issue.
One other error I encountered after circumventing this issue was that regex failed to install unless I used a Python version below v3.9.x. This does not conform to python version dependency in pyproject.toml.

@yajo
Copy link
Member

yajo commented Feb 24, 2021

This is probably because poetry has a few bugs regarding how it installs git dependencies, namely python-poetry/poetry#3240 and python-poetry/poetry#2921, maybe something else. Some docs dependencies come from git directly because I need some patches from master.

This will be fixed before releasing v6 because all deps must come from pypi at that point. But if you find further problems, I guess it would help more to notify them to poetry directly, and link here.

Thanks for the report!

@yajo yajo added this to the v6.0.0 milestone Feb 24, 2021
@yajo yajo added the bug label Feb 24, 2021
@yajo yajo self-assigned this Feb 24, 2021
@yajo
Copy link
Member

yajo commented Feb 24, 2021

@pawamoy I have to stop using latest master on mkdocstrings and pytkdocs because of this. See pdm-project/pdm#270 (comment) also.

Could you do some alpha release so I can install from pypi? 😅

yajo added a commit that referenced this issue Feb 24, 2021
@pawamoy
Copy link
Contributor

pawamoy commented Feb 24, 2021

Hey @yajo, sure, just one PR to merge in pytkdocs and I can release both mkdocstrings and pytkdocs 🙂

@pawamoy
Copy link
Contributor

pawamoy commented Mar 1, 2021

Everything is now released and resolvable 🙂

@yajo yajo linked a pull request Mar 3, 2021 that will close this issue
@yajo yajo closed this as completed in #366 Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants