Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
84 views

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) { ...
Robert's user avatar
  • 31
2 votes
0 answers
44 views

My query is while switching projects how we change python interpreter to that specific project .venv shown in bottom right & the (.venv) in terminal? Situation I have project1 with .env1 as venv I ...
yashpreet's user avatar
3 votes
2 answers
970 views

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 ...
sukesh's user avatar
  • 2,399
0 votes
2 answers
2k views

I'm just getting started with Python. This document talks about installing an interpreter, but I couldn't find the steps. How can I check if my system already has an interpreter, because I had ...
sukesh's user avatar
  • 2,399
2 votes
0 answers
66 views

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 ...
Jonas Grutter's user avatar
-1 votes
1 answer
151 views

After running this command (OS = Windows 11): virtualenv -p install python venv I'm getting this error: RuntimeError: failed to find interpreter for Builtin discover of python_spec='install' I had ...
China Brahma's user avatar
0 votes
2 answers
668 views

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 ...
IrfanClemson's user avatar
  • 1,779
0 votes
2 answers
1k views

Traceback (most recent call last): File "\<frozen runpy\>", line 198, in \_run_module_as_main File "\<frozen runpy\>", line 88, in _run_code File "C:\\Program ...
Bhargav's user avatar
  • 11
1 vote
0 answers
157 views

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-...
Nishank Jain's user avatar
-1 votes
1 answer
515 views

all instructions says in pycharm go to file->settings->python interpreter->show all->add interpreter tec. So , when i change to location with python27 i get such error: enter image ...
Pietia's user avatar
  • 1
0 votes
0 answers
42 views

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 ...
user87035's user avatar
1 vote
1 answer
9k views

On my Pop OS system the base Python interpreter is 3.10, and I installed Python 3.12, it works perfectly fine: With 3.12 I can create virtual environment, run Python files, so it works perfectly: ...
syrok's user avatar
  • 303
3 votes
2 answers
5k views

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 (...
Alok Marathe's user avatar
1 vote
0 answers
1k views

I have jumped the ship from arch to nixos and for compatibility with my server I am sticking with stable channel and using home-manager, yet to try flakes!! Setting up python environment has been the ...
Immature trader's user avatar
2 votes
1 answer
3k views

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 ...
user1938887's user avatar
12 votes
8 answers
33k views

I was coding for my game and installed the Python 3.10 interpreter. I choose the interpreter amd suddenly my PyCharm 2023.1 said the error "Environment location directory is not empty". ...
Kitten Strike's user avatar
0 votes
2 answers
131 views

I have a c++ code that loads a python interepter which uses stderr: intereptor.pyx stderr_dup = os.fdopen(sys.stderr.fileno(), 'wb', 0) The problem is that after Py_Finalize is called, stderr is ...
Atheel Massalha's user avatar
1 vote
0 answers
150 views

I have a python project on 2 different computers linked with GitHub so that I can open the project on both computers. Until now, it worked, but now I have this problem : I can't run the project on my ...
Sticonike's user avatar
-1 votes
1 answer
952 views

I installed the latest version of VS Code an Python (3.11.3). I also manually entered the path to select python, but still doesnt work. How can I set Python as Interpreter? This is the output that I ...
flexyflash's user avatar
1 vote
1 answer
140 views

I am having 2 problems. I am working on a remote server with vscode. When I use the command code to launch the vscode, it only launches it when I am not connected to the server. I searched for ...
Programmer's user avatar
0 votes
3 answers
3k views

I was noticing that my import pandas as pd was underlined as well as my other imports and from googling I figured out I merely needed to change my interpreter to the same one my WSL subsystem(ubuntu) ...
Waterfall's user avatar
1 vote
1 answer
569 views

I was forced to use WSL on Windows 10 to install the Python library Cartopy on my Windows machine correctly. It is way easier in a Linux-distribution, so I chose Ubuntu 20.04 WSL2. As a consequence, I ...
Andreas L.'s user avatar
  • 4,761
1 vote
1 answer
62 views

I want to use PythonInterpreter in Java code to remove file into recycle bin. This is my Python code: from send2trash import send2trash send2trash('C:\Slides\dog.jpg') This is my Java code: import ...
Vitalij Victor's user avatar
0 votes
0 answers
51 views

I am trying to create a maven java project which calls python script that have imports from 3rd party modules like pandas. I have installed Python3 and installed pandas using pip command. I am using ...
LetsCode's user avatar
  • 198
-1 votes
1 answer
84 views

Since last many months I was using intellij idea comfortably but suddenly something went wrong and all my existing projects are not running now. I have the python virtual environment in SDK section ...
SAGAR PATHAK's user avatar
0 votes
0 answers
36 views

I ran below code in python shell and from a python file, I expected the same output but ironically i get NameError: name '_' is not defined error in python file. >>> 10+2 12 >>> ...
Alireza Bahrami's user avatar
1 vote
1 answer
658 views

How to destroy python interpreter in pybind11 to call python function from c++ in loop Here am getting output for the first time ,when it's come for 2nd time loop it's throwing Microsoft C++ exception:...
Chanukya N's user avatar
0 votes
0 answers
16 views

I already uninstalled and re-installed the matplotlib module on main terminal and in vs code as well but it still doesn't work. Is there another way to fix this error like creating a virtual ...
CodeHatter's user avatar
-1 votes
1 answer
217 views

I am following Ben Eaters tutorial on the 6502 computer and I'm completely lost on the python programming stuff. I have a little bit of programming knowledge, but not enough to understand which ...
DiodeDan's user avatar
1 vote
2 answers
10k views

I am currently working in VSCode and attempting to import various libraries into my file. I am currently using the interpreter image of interpreter. The remainder of my code is shown remainder of code....
Elias Lind's user avatar
0 votes
0 answers
65 views

I was experimenting with class method in python when I stumbled upon this issue of id. class MyClass: def method(self): return 'instance method called', self @classmethod def ...
Aayush Shah's user avatar
10 votes
1 answer
610 views

To start I tried this def x(): try: 1/0 # just an division error to get an exception except: x() And this code behaves normally in 3.10 and I get RecursionError: maximum recursion ...
Axeltherabbit's user avatar
-1 votes
2 answers
1k views

Has anybody seen this error while trying to to choose the python interpreter in VSCode? I immediately get an error when trying to find an appropriate interpreter. Is there any way around this problem?...
Mahta's user avatar
  • 13
-1 votes
1 answer
115 views

I installed python in my system and no error occurred, I also configured it for vs code but anything I open VsCode, I get prompted with the python interpreter telling me to repair or uninstall and it ...
Gabriel Usen's user avatar
3 votes
2 answers
116 views

With this line: print(sum(tuple), len(tuple), sum(tuple)/len(tuple)) Will python cache sum(tuple) in the 0 index and use it in the average calculation (2 index)? Or will with calculate sum(tuple) ...
Xanthan's user avatar
  • 181
0 votes
1 answer
2k views

I had this problem for several months now. I have multiple versions of python interpreters located in different folders inside my mac. I have pycharm and anaconda installed. This is so far not an ...
Anas Rzq's user avatar
  • 103
0 votes
3 answers
814 views

I have a Python module (PyBind11 C++ Lib) that resides on an ECU. To use this library I need a SSH connection to the ECU to start a Python instance via the terminal. ~$ ssh root@IP ~$ python3 python ...
JuSt Alex's user avatar
0 votes
0 answers
89 views

How would one capture ALL Python failures and log them into a file? Not just failures captured in a try: / except: code within the program but ALL failures. So if there was a line in the code that ...
Jay Mosk's user avatar
  • 377
0 votes
1 answer
544 views

I tried creating different conda environments, and all of them except base have this same issue to some degree: some python versions have the correct anaconda path, but some lead to the homebrew ...
notactuallyfelix's user avatar
0 votes
1 answer
252 views

Main.py causes error when in a folder but not when in test folder Every time I run a .py file in Pycharm when it is in a folder this error happens. I speculate that it has something to do with the ...
Haj's user avatar
  • 1
0 votes
1 answer
1k views

I installed and activated pipenv in my project folder, but then I couldnt see the Pipenv in the list of Python interpreter. This is the steps I did: Create new project folder, cd to this folder. ...
Yenna's user avatar
  • 41
0 votes
1 answer
282 views

I would like to setup a pygame app from ipython in a background thread. I already tried to import pygame from this thread before importing it anywhere else. The problem is that when I launch my main ...
hl037_'s user avatar
  • 3,947
0 votes
1 answer
770 views

I want to embed a Python interpreter within my C++ application, and make them call each other. I followed the sample in the official doc of pybind11, and now I can call a Python sub-program and create ...
Leon's user avatar
  • 2,165
1 vote
1 answer
7k views

I followed a lot suggestions to add the interpreter to PyCharm, but they're simply not working. I want to figure out what the exact problem is here. First, it said no interpreter is found, so I tried ...
blackbird7's user avatar
7 votes
1 answer
2k views

I have just started to get into programming and needed some help. My issue started when I would open up my VScode on my Mac and my python interpreter version would not show up in the status bar. I've ...
greenforest's user avatar
0 votes
2 answers
788 views

def x1(): y = input("Input pet here: ") if y == "pet": return True else: return False x1() def x2(): y = input("Input pet here: ") if ...
Jirafey's user avatar
  • 69
3 votes
0 answers
148 views

I'm using Python under Anconda in Ubuntu running on WSL2. When I use arrow keys to go through the command history control characters (I assume) are printed instead of showing the previous commands: ...
Ian Newson's user avatar
  • 7,957
1 vote
3 answers
3k views

I created a python file and used some packages. I installed packages on a virtual Environment. Now, when I try to run that file, it run on the default installed interpreter and I have to activate the ...
Ishant's user avatar
  • 21
0 votes
1 answer
570 views

I am having trouble figuring out venv and getting my Python script to import libraries in Vscode. I set up a virtual environment and imported libraries necessary (matplotlib). I've activate the ...
Thibaud Roy's user avatar
1 vote
1 answer
656 views

I am trying to call python code from java file using Jython 2.7.2 with python files using version 3.9 but getting the error. Java code as below: PythonInterpreter interpreter = new PythonInterpreter();...
Shubham Singla's user avatar