Sometimes having to pip install after doing Poetry Add #6715
Replies: 7 comments 4 replies
-
Please give..all the details, your pyproject.toml, the command you run, and the error you receive. |
Beta Was this translation helpful? Give feedback.
-
So... I don 't know about pyenv at all. pip installing inside your poetry environment is definitely..not the right way to do things, as you've already stated. Could you show the first few lines of manage.py, I'm not familiar with that. Is it just a standard python script, or is it doing funky things to sys.path? From a completely fresh .venv, could you: |
Beta Was this translation helpful? Give feedback.
-
Sorry, meant to be |
Beta Was this translation helpful? Give feedback.
-
Gargh. Markup. Dunder file dunder |
Beta Was this translation helpful? Give feedback.
-
Again, I don't understand what pyenv is doing, so don't use any aliases referring to that |
Beta Was this translation helpful? Give feedback.
-
And poetry run manage.py I guess |
Beta Was this translation helpful? Give feedback.
-
Similar but not identical experience here. I am using:
Neither bertopic nor one dependency, llvmlite (0.34.0) would install with poetry. When I used pip instead, they installed as expected, but note that prior to this, poetry had successfully installed all the other dependencies. All packages are in the same site-packages subfolder.
When I put bertopic's quickstart.py into the editor, PyCharm gave a warning that neither bertopic nor sklearn were in requirements.txt. But when you click to have that done, PyCharm knows to suggest pyproject.toml. It also gives me a little pop up warning that 'poetry.lock is out of date'. The reason I am posting is because neither pyproject nor poetry lock updated to show the rather long list of dependencies that poetry did install, even after calling poetry update. Is this going to be a problem in the near future? Should I manually put all of them into pyproject? Note, I no longer get the lock out of date pop up after running poetry update. poetry.lock:
pyproject.toml:
|
Beta Was this translation helpful? Give feedback.
-
I did a search for a similar post before I posted this
I just started work on a Django project using wsl2, ubuntu, poetry, pyenv, python 3.10.6. Anytime I tried to do something with the project (check it, migrate it to create tables, etc), I would get a message that module django isn't found. I have used poetry for a while now, so I'm fairly familiar with it. I figured out that I could do a poetry add, and then follow up with a python -m pip install but that really bothers me. Poetry is suppose to be doing that for me and I worry that this will cause down the road issues with deployment. I ran into this issue with several packages including django, pymysql, and a few others. I'm running the latest My poetry env looks like..
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Virtualenv
Python: 3.10.6
Implementation: CPython
Path: /home/mryan/python/django/Surge/.venv
Executable: /home/mryan/python/django/Surge/.venv/bin/python
Valid: True
System
Platform: linux
OS: posix
Python: 3.10.6
Path: /home/mryan/.pyenv/versions/3.10.6
Executable: /home/mryan/.pyenv/versions/3.10.6/bin/python3.10
I would love to resolve this. Maybe I'm doing something wrong or there's just a limitation of poetry that I am not aware of. Any thoughts or advice?
Beta Was this translation helpful? Give feedback.
All reactions