132 questions
2 votes
1 answer
84 views
Can I reuse an instance of PythonInterpreter - perhaps via PyCode object?
I have a script that I load via: python = new PythonInterpreter(); String script = "script I loaded from somewhere" try { python.exec(script); } catch (Exception e) { ...
3 votes
2 answers
943 views
Unresponsive Python interactive window in Visual Studio 2022
I have installed the Python development workload in Visual Studio 2022. When I try to execute 2+2 in the interactive window, there is no result and I only see the waiting mouse cursor. Is this ...
2 votes
0 answers
65 views
How to use a .sh script as a wrapper for the used Python interpreter in VS Code?
I want to use a .sh file as a wrapper for executing Python because I need to import specific environment variables before running my Python scripts. The structure of my .sh file (my_python.sh) looks ...
0 votes
2 answers
654 views
Visual Studio Code Terminal is Not Using Correct Python Interpreter
I have Visual Studio Code (v 1.9) running on a Windows 10 machine. I want to use ESRI's Python interpreter and I selected that per this image: After that, if I use the Run (right arrow) toward the ...
1 vote
0 answers
157 views
Gettin the error An incompatible architecture (have 'x86_64', need 'arm64')) while running python project in pycharm
I am trying to run python automation project on Mac M1 Pro OS 14.2.1 and I am getting the following error: ImportError: dlopen(/Users/{username}/PycharmProjects/EzeAuto/venv/lib/python3.8/site-...
0 votes
0 answers
42 views
How are python variable names resolved? (explanations on the web are a bit uncertain)
It seems that there are two things that are not being distinguished in some guides about this. When a function is running, there is its local scope, and some scopes above her on call stack. Each scope ...
3 votes
2 answers
5k views
Invalid python interpreter selected for the project - Pycharm
I encountered an error in one of my projects after a few months, and it wasn't there the last time I checked. I previously fixed a similar error in another project by deleting the virtual environment (...
2 votes
1 answer
3k views
VS code error: import "requests" could not be resolved from source
When I try to 'import requests' in my views.py, why is Visual Code Studio throwing this error: import "requests" could not be resolved from source Pylance A screenshot of the configuration ...