-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/venvRelated to virtualenv managementRelated to virtualenv managementkind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/confirmedIssue is reproduced and confirmedIssue is reproduced and confirmedversion/1.2.1
Description
- Poetry version: 1.2.1 or 1.2.0
- Python version: 3.8.10 or 3.9.4
- OS version and name: Ubuntu 20.04 (WSL) or Windows 10
- pyproject.toml: https://github.com/hms5232/0ver-department-keyword
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
Issue
My project is open source, so I directly put repo url in pyproject.toml item.
The project usage is:
- Download or clone repo.
cdinto project and runpoetry install
but, the poetry install will give me following error:
Command ['/home/hhm/.cache/pypoetry/virtualenvs/0ver-department-keyword-d1mZarpb-py3.8/bin/python', '-W', 'ignore', '-'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/json/__init__.py", line 106, in <module>
from .decoder import JSONDecoder, JSONDecodeError
File "/usr/lib/python3.8/json/decoder.py", line 3, in <module>
import re
File "/usr/lib/python3.8/re.py", line 127, in <module>
import functools
File "/usr/lib/python3.8/functools.py", line 18, in <module>
from collections import namedtuple
File "/usr/lib/python3.8/collections/__init__.py", line 22, in <module>
from keyword import iskeyword as _iskeyword
File "/home/hhm/0ver-department-keyword/keyword.py", line 8, in <module>
import data_model
File "/home/hhm/0ver-department-keyword/data_model.py", line 4, in <module>
from ckiptagger import data_utils
ModuleNotFoundError: No module named 'ckiptagger'
input was : import json
import sys
print(json.dumps(sys.path))
Both keyword.py and data_model.py is project business logic, and depend on ckiptagger package to work. Poetry resolve those files and I don't know why.
Current tree:
hms5232@wsl:~/0ver-department-keyword$ tree
.
├── LICENSE
├── README.md
├── __pycache__
│ ├── data_model.cpython-38.pyc
│ └── keyword.cpython-38.pyc
├── data_model.py
├── keyword.py
├── poetry.lock
├── pyproject.toml
└── school_data.csv
1 directory, 9 files
After googling and getting nothing, I try to change project directory as poetry new: mkdir src && mv *.py src/, and poetry install works!
hms5232@wsl:~/0ver-department-keyword$ tree
.
├── LICENSE
├── README.md
├── __pycache__
│ ├── data_model.cpython-38.pyc
│ └── keyword.cpython-38.pyc
├── poetry.lock
├── pyproject.toml
├── school_data.csv
└── src
├── data_model.py
└── keyword.py
2 directories, 9 files
This is happened after Poetry 1.2. If I remember correctly, Poetry 1.1 had worked well. I'm not sure this is a bug or not, or maybe something (ex: pre-releasing note) I missing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/venvRelated to virtualenv managementRelated to virtualenv managementkind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/confirmedIssue is reproduced and confirmedIssue is reproduced and confirmedversion/1.2.1