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

Poetry add mkdocs-table-reader-plugin hangs when resolving dependencies #28

Closed
HundredVisionsGuy opened this issue Jul 19, 2022 · 3 comments

Comments

@HundredVisionsGuy
Copy link

I tried installing mkdocs-table-reader-plugin using poetry add mkdocs-table-reader-plugin but it hangs and never resolves.

I ran the poetry command at 1:38pm, and it added mkdocs-table-reader-plugin = "^1.1.0" to my pyproject.toml file, but when it got to the Resolving dependencies... state, it just stalled.

I let it run

My Environment:
OS: Windows 10
Python - using 3.7 in my virtual environment
Project I'm trying to add it to is at file-clerk repo (note: I'm waiting to push my latest commit until I get this resolved, so you won't see the code.

It's now 2:10 over 40 minutes after I ran the command, and it's still hanging.

I'm going to try the suggestions from Poetry install is stuck on specific dependency with "pending..."

If it works, I'll happily contribute to the docs if you like.

I'm attaching the current state of the pyproject.toml and poetry.lock (as txt files [pyproject.toml.txt]

@HundredVisionsGuy
Copy link
Author

I think it's due to the pandas dependency, which requires Python 3.8 or higher, and I was using Python 3.7.

Here's what I did to discover the isuue: I deleted the lock file, and re-ran poetry update, but I added the -vvv for verbose output (poetry update -vvv).

You can see the stack trace below:
poetry update stacktrace.txt

@HundredVisionsGuy
Copy link
Author

HundredVisionsGuy commented Jul 19, 2022

I got it working after updating my poetry env to use Python 3.9.
The steps required in Windows:

  1. Download Python 3.8 or 3.9 and note where the path to python.exe is.
  2. In the terminal run the following to update your poetry env to switch Python version: poetry env use C:\path\to\python\folder\python.exe (in my case, it was in C:\Users\myusername\AppData\Local\Programs\Python\Python39\python.exe
  3. Not sure if this is necessary, but you might want to delete poetry.lock before running update or add
  4. Run either poetry add mkdocs-table-reader-plugin (if you don't have it in the pyproject.toml file) or poetry update if the library is there.

As I said, if you would like me to contribute my notes to the documentation, I am more than happy to; otherwise, do what you want with this issue.

@timvink
Copy link
Owner

timvink commented Jul 20, 2022

pandas does not support python 3.7 since their 1.4.x releases (https://github.com/pandas-dev/pandas/releases/tag/v1.4.0).

This package requires pandas>=1.1:

install_requires=["mkdocs>=1.0", "pandas>=1.1", "tabulate>=0.8.7", "PyYAML>=5.4.1"],

pip should be able to automatically determine the latest suitable version (which would be pandas==1.3.5 for python 3.7). See https://pip.pypa.io/en/stable/topics/dependency-resolution/

So, this is not a problem with this plugin. In your case, it seems poetry is not allowing for this backtracking (copied from the stacktrace):

  Because no versions of mkdocs-table-reader-plugin match >1.1.0,<2.0.0
   and mkdocs-table-reader-plugin (1.1.0) depends on pandas (>=1.1), mkdocs-table-reader-plugin (>=1.1.0,<2.0.0) requires pandas (>=1.1).
  Because pandas (1.4.3) requires Python >=3.8
   and no versions of pandas match >=1.1,<1.4.3 || >1.4.3, pandas is forbidden.
  Thus, mkdocs-table-reader-plugin is forbidden.
  So, because file-clerk depends on mkdocs-table-reader-plugin (^1.1.0), version solving failed.

This line no versions of pandas match >=1.1,<1.4.3 || >1.4.3 seems wrong, as you can see on pypi pandas has f.e. 1.3.5. Maybe a proxy issue on your windows setup or something?

Good that upgrading python solves it. Python 3.7 supports ends in 11 months (https://endoflife.date/python), so probably best to upgrade your python version anyway :)

@timvink timvink closed this as completed Jul 20, 2022
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

No branches or pull requests

2 participants