poetry install location #6418
-
|
I'm trying to build docker with python3.9 and poetry1.2 version. I'm installing packages using below command. looks like poetry installing packages under directory ( ./usr/local/lib/python3.8/dist-packages/httpx) and since installed directory is not under sys path the packages being ignored. i didn't see this issue with 3.8(/usr/local/lib/python3.8/dist-packages/). can you help what's going wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
When you install with Poetry into system site-packages, the site-packages selected by Poetry will correspond to the interpreter running Poetry. Try running Note that What problem are you trying to install by installing into system site-packages? |
Beta Was this translation helpful? Give feedback.
-
|
Installation into system site-packages is an antipattern in most containers -- a virtual environment doesn't just isolate your code from other Python code, but from the operating system and other tools (like Poetry) as well. Please see #6397 (comment) for a pattern you can try in your Dockerfiles, and #6398 for additional context. |
Beta Was this translation helpful? Give feedback.
Installation into system site-packages is an antipattern in most containers -- a virtual environment doesn't just isolate your code from other Python code, but from the operating system and other tools (like Poetry) as well. Please see #6397 (comment) for a pattern you can try in your Dockerfiles, and #6398 for additional context.