Replies: 2 comments
-
|
Hey,
You've said, that you already have activated the venv. What's the output of fin swimmer |
Beta Was this translation helpful? Give feedback.
-
|
Hello, Thanks! I didn't know I just removed the package from the global environment again and then hit the same "module not found" error when executing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using Python for data analysis and have recently switched to Poetry.
Following the documentation I have initialised a pre-existing directory to set up with poetry. After activating my virtual environment with
source <path to env>/Scripts/activateI then usepoetry run python scr/script.pybut it fails because a specific module can't be imported (psycopg2). Whilst in the virtual environmentpoetry showreturn that package as installed, whereaspip listin the global environment doesn't.As soon as I install psycopg2 in the global environment with
pip installI can then successfully execute the Python script withpoetry run.I'm not sure whether this is a bug or whether I've misunderstood something. Any help appreciated!
Info:
Beta Was this translation helpful? Give feedback.
All reactions