You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a ModuleNotFoundError when trying to run my Python script that imports PyInquirer. Despite having PyInquirer installed in my virtual environment, the script fails to recognize the module.
The error mesage is:
Traceback (most recent call last):
File "[Censored]", line 3, in
import PyInquirer as Inquirer
ModuleNotFoundError: No module named 'PyInquirer'
note:
PyInquirer is correctly installed within the virtual environment.
Python version: 3.12
Operating System: windows
IDEs tested: vs code, pycharm
The appropriate Python interpreter from the virtual environment is selected
The text was updated successfully, but these errors were encountered:
I'm encountering a ModuleNotFoundError when trying to run my Python script that imports PyInquirer. Despite having PyInquirer installed in my virtual environment, the script fails to recognize the module.
The error mesage is: Traceback (most recent call last): File "[Censored]", line 3, in import PyInquirer as Inquirer ModuleNotFoundError: No module named 'PyInquirer'
note: PyInquirer is correctly installed within the virtual environment. Python version: 3.12 Operating System: windows IDEs tested: vs code, pycharm The appropriate Python interpreter from the virtual environment is selected
Make sure that the script is using the correct Python interpreter associated with your virtual environment.
You can try the following :
Activate Your Virtual Environment:
Ensure that the virtual environment where you installed PyInquirer is activated in the terminal where you're running the script. You can activate it by running:
source path_to_your_env/Scripts/activate # On Windows
After activation, you should see the virtual environment name in your terminal prompt.
Verify the Package Installation:
With the virtual environment activated, check if PyInquirer is installed by running:
pip list
or
pip show PyInquirer
If PyInquirer shows up in the list, it’s installed correctly. If it doesn't, you might need to reinstall it using pip install PyInquirer.
Check Your IDE Settings:
Since you're using VS Code and PyCharm, make sure that both are configured to use the Python interpreter from your virtual environment.
In VS Code, you can check this by looking at the Python version displayed in the bottom-left corner of the window.
In PyCharm, you can verify this in the project settings under "Python Interpreter."
I'm encountering a ModuleNotFoundError when trying to run my Python script that imports PyInquirer. Despite having PyInquirer installed in my virtual environment, the script fails to recognize the module.
The error mesage is:
Traceback (most recent call last):
File "[Censored]", line 3, in
import PyInquirer as Inquirer
ModuleNotFoundError: No module named 'PyInquirer'
note:
PyInquirer is correctly installed within the virtual environment.
Python version: 3.12
Operating System: windows
IDEs tested: vs code, pycharm
The appropriate Python interpreter from the virtual environment is selected
The text was updated successfully, but these errors were encountered: