admin管理员组文章数量:1386701
I have installed Poetry via the official shell script. I have by now also reinstalled it several times. which poetry
returns /home/myuser/.local/bin/poetry
. The Poetry version is 2.1.1. The python versions are managed by Pyenv.
When I set up an empty project, I can use poetry without any issues. But if I try to do poetry install
on an existing project that I pull from github, it responds with No module named 'numpy'
. This is the response I get no matter which command I try, even poetry --version
returns the same error.
This has happened on any existing project I have tried. It's not a packaging error - Poetry doesn't get far enough to even try to install packages. I have gone through everything I could find online, it doesn't seem like this error has been discussed before.
I have installed Poetry via the official shell script. I have by now also reinstalled it several times. which poetry
returns /home/myuser/.local/bin/poetry
. The Poetry version is 2.1.1. The python versions are managed by Pyenv.
When I set up an empty project, I can use poetry without any issues. But if I try to do poetry install
on an existing project that I pull from github, it responds with No module named 'numpy'
. This is the response I get no matter which command I try, even poetry --version
returns the same error.
This has happened on any existing project I have tried. It's not a packaging error - Poetry doesn't get far enough to even try to install packages. I have gone through everything I could find online, it doesn't seem like this error has been discussed before.
Share Improve this question asked Mar 17 at 10:57 DarinaDarina 1,63210 silver badges19 bronze badges 3 |1 Answer
Reset to default 0Solved - the issue was never directly with poetry
or with pyproject.toml
. Every repo I tried to install also contained a build.py
file that imported numpy first. Poetry runs this before anything else, hence the error was generated. The solution was to modify build.py
so that it does not import at the top level.
本文标签: Poetry quotno module named numpyquot when installing from existing projectStack Overflow
版权声明:本文标题:Poetry "no module named numpy" when installing from existing project - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744566074a2613054.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
poetry --version
also breaks and that's not reliant on anything contained in the pyproject.toml file – Darina Commented Mar 17 at 13:00