kazhala / InquirerPy

:snake: Python port of Inquirer.js (A collection of common interactive command-line user interfaces)
https://inquirerpy.readthedocs.io
MIT License
350 stars 20 forks source link

Issue with installing in venv? #59

Open wabiloo opened 1 year ago

wabiloo commented 1 year ago

Hi, It's probably nothing to do with you, but when I try to install the package with pip3 in a virtual environment (venv), it does not seem to ever install it within it, which causes my IDE (VSCode with Pylance) not to find it for import. I've never seen that, and I don't seem to have issues with other packages...

I've tried (after activation of the venv naturally): pip3 install InquirerPy pip3 install -U InquirerPy pip3 install --ignore-installed -U InquirerPy

But none of them actually created the package under my .venv/lib/python3.11/site-packages/ folder

Any idea?

Gracecr commented 1 year ago

I would try python -c "import sys;print(sys.executable)" to make sure that you're running from your virtual environment. Next, try python -m pip install -U InquirerPy to ensure that you're running the pip associated with your virtual environment.

rreben commented 1 year ago

Check whether VS Code uses the venv. This should be configured automatically. In the lower right corner (status bar of VSCode) you find a dropdown field with the various python environments, sometimes you have to set the right environment automatically. you can try the 'which' command to figure out which python interpreter is used in the terminal.