question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python >3.7 should skip install `pathlib`, otherwise will be failed when existing package depends on `pathlib`

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name:
  • Poetry version:
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

latest setuptools add a new vendor importlib_meta which used pathlib.

If my dependency depends on pathlib, poetry will still try to install it. But I don’t know why setuptools try to use the pypi pathlib rather than built-in pathlib, which PosixPath has no attribute read_text.

origin_img_v2_64ebba27-6050-4183-850c-4511fc57311g

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
finswimmercommented, Mar 9, 2022

Than you have at least two options:

  1. Contact the maintainer of this dependency, that they can add the python restriction to the pathlib dependency.
  2. Add the restriction to your package as shown above. Poetry will than drop this dependency for python >3.4 as well.
0reactions
zen-xucommented, Mar 10, 2022

Ok

Read more comments on GitHub >

github_iconTop Results From Across the Web

I Get ImportError: No module named pathlib, even after ...
When you install python on windows "python" defaults to the python 2.7 installation ( probably changed now that 2.7 is no longer supported)...
Read more >
ERROR: Cannot install because these package versions have ...
Option 1 - Use a Pre-Configured Environment]: Use install_gluonts() to install GluonTS Python Dependencies into a conda environment named ...
Read more >
Bug #1962819 “pip fails to install pathlib in Ubuntu 22.04 with ...
This breaks any package relying on pathlib. The output from the install command is: rocko@ubuntu:~$ pip install pathlib Defaulting to user ...
Read more >
pathlib - PyPI
pathlib offers a set of classes to handle filesystem paths. It offers the following advantages over using string objects: No more cumbersome use...
Read more >
4. Using Python on Windows — Python 3.11.1 documentation
All of the options available in the installer UI can also be specified from the command line, allowing scripted installers to replicate an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found