Questions tagged [pythoninterpreter]

The PythonInterpreter class is a standard wrapper for a Jython interpreter for embedding in a Java application.

The PythonInterpreter class is a standard wrapper for a Jython interpreter for embedding in a Java application. Javadoc can be found [here].(http://www.jython.org/javadoc/org/python/util/PythonInterpreter.html)

127 questions
0
votes
3 answers

how to change VS code interpreter on Windows WSL

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) was using, which is python 3.8. However, an…
0
votes
0 answers

why jython java PythonInterpreter doesn't find the module

I want to run java code in IntelliJ IDEA: public static void main(String[] args) { PythonInterpreter py = new PythonInterpreter(); py.exec("from send2trash import send2trash \nsend2trash('cat-2.jpg')"); } and in the console I…
0
votes
0 answers

Calling python having imports from 3rd party modules from Java using jython gives ImportModuleError

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 vsCode as IDE and has windows 10 OS. Im attaching…
vineeth
  • 198
  • 3
  • 13
0
votes
0 answers

Python3.7.9 to 3.11.1 venv activation issue

Why does my python version/path change from 3.11 to 3.7 when I activate the venv. I have already set the PowerShell path to 3.11.1 which is recognized by Python before activating the venv and once it's deactivated.
0
votes
0 answers

Why python shell stores last expression in _ variable but python file does not?

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 >>> print(_) 12 So i started wondering why python shell stores last…
0
votes
0 answers

is there another way to to fix the import matplotlib error in python?

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 environment or it's not required? Please bear with me…
CodeHatter
  • 21
  • 5
0
votes
0 answers

Why is the value of id different for the classmethod in python when used with and without the called method?

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 classmethod(cls): return 'class method…
0
votes
0 answers

CMakeError: Could NOT find PythonInterp: Found unsuitable version

I can successfully install ROS in my Mac and I can open RVIZ from this tutorial. However, I feel confused to follow the ROS tutorial and I have the following error when I create a workspace that my python version in a specific directory is not…
0
votes
1 answer

Managing multiple python interpreters

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 issue as I know that this would enable the choice to…
Anas Rzq
  • 53
  • 6
0
votes
3 answers

Running Python code over an existing SSH tunnel

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 3.8.2 (default, Feb 25 2020, 10:39:28) [GCC…
JuSt Alex
  • 1
  • 1
0
votes
0 answers

How to capture all Python code failures where not normally expecting to use try / except

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 does not fail until that code block is reached…
Jay Mosk
  • 197
  • 1
  • 2
  • 8
0
votes
1 answer

Why do my anaconda new environments use homebrew for python path?

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 pythons. For example, (base) ~ % which…
0
votes
1 answer

How do I change where Pycharm is trying to find my main.py file?

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 interpreter or the virtual environment but I am not…
Haj
  • 1
0
votes
1 answer

Python - Pipenv not display in the Python interpreter

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. Install pipenv: pip3 install pipenv Activate it:…
Yenna
  • 11
  • 2
0
votes
1 answer

How to run pygame in background from ipython / python interpreter?

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 loop inside this thread, soon, it gets frozen…
hl037_
  • 3,520
  • 1
  • 27
  • 58
1 2 3
8 9