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
2 answers

I have uploaded a Python package in pip, then pip installed this package, but I can't import this package in Python Interpreter

I have just uploaded a Python package into pip called hqc: https://pypi.org/project/hqc/0.0.1/ then successfully pip installed the package using: pip install hqc but I can't seem to import the package in Python Interpreter. When I do this, I get…
Leockl
  • 1,906
  • 5
  • 18
  • 51
0
votes
0 answers

How to automatically import packages in Pycharm without changing interpreter

Every time I download a package(like tensorflow, scipy, etc) from pip I need to manually change the project interpreter in Pycharm before I can import the package, which feels annoying. What's even worse is that I can easily execute import commands…
Jason
  • 15
  • 1
  • 5
0
votes
1 answer

How can I get PythonInterpreter to recognize datetime and other modules such as psutils in python?

I am running a python program called diagnostics.py from a java class called PyInterpreter that intializes a jython PythonInterpreter object and a file to use and can run methods from that python program. My python program looks like this: import…
0
votes
1 answer

How to run as root in PyCharm in Ubuntu 16.04?

I followed recommendations from the following link but I did not get the result. The problem is that, I am unable to add the new python-sudo.sh file to the interpreter path. The path of the new python-sudo.sh is /home/user_name/python-sudo.sh.The Ok…
0
votes
1 answer

What determines output when executing single variable in python interpreter?

So take the complex built-in type as an example. I am making my own version of Complex for educational purposes, however as of now, they aren't behaving the same way. When I run >>> a = (2+3j) >>> a (2+3j) >>> from complex import Complex # My…
Snusifer
  • 485
  • 3
  • 17
0
votes
0 answers

Why does 2//0.2 return 9.0 but 5//0.5 return 10.0 in Python

In Python 3 interpreter, 1//0.1 2//0.2 4//0.4 returns 9.0, but 5//0.5 3//0.3 returns 10.0. Is this rounding-off behavior correct?
Anuvrat Tiku
  • 1,616
  • 2
  • 17
  • 25
0
votes
1 answer

Why is python interpreter not working on Zeppelin 0.8.0 for any of my notebooks?

I am simply typing: %python print ("hi") but it keeps showing the following error every time I run it for any of my notebooks: java.lang.OutOfMemoryError: Java heap space at …
Archeologist
  • 169
  • 1
  • 11
0
votes
0 answers

Inject kwargs into every function in Python

We have quite a big code base containing lots of functions in python. Due to recent changes, we need to add a kwarg to every function. We of course can manually change all the functions' signature to have the kwarg, but is there a better way to do…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
0
votes
0 answers

jython java PythonInterpreter

i need to run a python script in java, (using jython standalone jar) but when i run the script i got this error: ImportError: No module named pytesseract how can import python library, to run this script?? public class SimpleEmbedded { public static…
Alfonso
  • 113
  • 9
0
votes
1 answer

cannot import python pkgs in C++

I wanna build a C++ program to run python Scripts which imports numpy, my python version is anaconda, I run the program but it reports "No module named numpy". Here is the code #include #include int main(int argc, char…
BIT_Bang
  • 61
  • 1
  • 10
0
votes
2 answers

Is Python byte-code, interpreter independent?

This is an obvious question, that I haven't been able to find a concrete answer to. Is the Python Byte-Code and Python Code itself interpreter independent, Meaning by this, that If I take a CPython, PyPy, Jython, IronPython, Skulpt, etc,…
ekiim
  • 792
  • 1
  • 11
  • 25
0
votes
1 answer

How to run Selenium with Webdriver on Online Python interpreters?

Folks, I have a scraping script that I need to run on specific times for live info, but I can't have my computer on me all day. So I thought about running it on an online interpreter, but repl.it doesn't have webdriver and the other I found didn't…
0
votes
1 answer

Distributing Pycharm projects with Modules installed in Interpreter without receivers/classmates needing to install said modules

I have installed the pyodbc, and numpy in an interpreter for the project as shown from my home computer . I tried zipping the pycharm project in hopes that I could run it with a different computer with pycharm (without needing to install the…
Zirc
  • 460
  • 3
  • 14
0
votes
1 answer

How to use the python interpreter while another python process is running?

I use Python 3.6 and start a process in my script (VTK Visualization). Until I close the visualization window the command line is blocked which I want to change. I read something about multiprocessing and threading, but I'm not sure which is the…
user8757434
0
votes
0 answers

Change default End-Of-Line character Windows Python interpreter accepts to run lines of code

Is there a way to change the what the default end-of-line character the standard python interpreter (REPL) in Interactive Mode will accept to run a line of code? On a Windows os, the interpreter only accepts \r\n before it will run a line of code. I…
Clay
  • 2,584
  • 1
  • 28
  • 63
1 2 3
8 9