Replies: 1 comment
-
@scheung38 not sure why you would need poetry add pathlib --python "<3.4" For those that are interested, the reason why poetry does not apply any python constraint by default, this is because the project metadata does not contain $ curl -sL https://pypi.org/pypi/pathlib/json | jq -r '.info.python_requires'
null |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
poetry add pathlib
Using version ^1.0.1 for pathlib
Updating dependencies
Resolving dependencies... (0.4s)
Package operations: 1 install, 0 updates, 0 removals
• Installing pathlib (1.0.1): Failed
EnvCommandError
Command ['$HOME/Library/Caches/pypoetry/virtualenvs/devex-cli-oqezQ_Pz-py3.10/bin/pip', 'install', '--no-deps', 'file://$HOME/Library/Caches/pypoetry/artifacts/9c/d2/d7/58b5af0350587d8ebbcde29be9253a3f5445d25d3382ede7e4675995fc/pathlib-1.0.1.tar.gz'] errored with the following return code 1, and output:
Processing $HOME/Library/Caches/pypoetry/artifacts/9c/d2/d7/58b5af0350587d8ebbcde29be9253a3f5445d25d3382ede7e4675995fc/pathlib-1.0.1.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: $HOME/Library/Caches/pypoetry/virtualenvs/devex-cli-oqezQ_Pz-py3.10/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/04/cc5jymsj29s0d7_20tq44n4r0000gn/T/pip-req-build-vxckhzc3/setup.py'"'"'; file='"'"'/private/var/folders/04/cc5jymsj29s0d7_20tq44n4r0000gn/T/pip-req-build-vxckhzc3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/04/cc5jymsj29s0d7_20tq44n4r0000gn/T/pip-pip-egg-info-cdodwaz2
cwd: /private/var/folders/04/cc5jymsj29s0d7_20tq44n4r0000gn/T/pip-req-build-vxckhzc3/
Complete output (13 lines):
Traceback (most recent call last):
File "", line 1, in
File "$HOME/Library/Caches/pypoetry/virtualenvs/devex-cli-oqezQ_Pz-py3.10/lib/python3.10/site-packages/setuptools/init.py", line 17, in
import setuptools.version
File "$HOME/Library/Caches/pypoetry/virtualenvs/devex-cli-oqezQ_Pz-py3.10/lib/python3.10/site-packages/setuptools/version.py", line 1, in
import pkg_resources
File "$HOME/Library/Caches/pypoetry/virtualenvs/devex-cli-oqezQ_Pz-py3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 23, in
import zipfile
File "$HOME/.asdf/installs/python/3.10.0/lib/python3.10/zipfile.py", line 19, in
import pathlib
File "/private/var/folders/04/cc5jymsj29s0d7_20tq44n4r0000gn/T/pip-req-build-vxckhzc3/pathlib.py", line 10, in
from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (/Users/sebastiancheung/.asdf/installs/python/3.10.0/lib/python3.10/collections/init.py)
----------------------------------------
WARNING: Discarding file:///Users/sebastiancheung/Library/Caches/pypoetry/artifacts/9c/d2/d7/58b5af0350587d8ebbcde29be9253a3f5445d25d3382ede7e4675995fc/pathlib-1.0.1.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1183 in run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
OS version and name: Mac Monterey 12.0.1
Poetry version: Poetry version 1.1.11
python --version
Python 3.10.0
Beta Was this translation helpful? Give feedback.
All reactions