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
27
votes
1 answer

Why is gunicorn calling sys.exit(1)?

Gunicorn is sometimes crashing my server, actually exiting the Python interpreter with sys.exit(1)! Why is this? Note that the failure is not always at the same point. In the two cases shown below, there is a different last codeline before …
Joshua Fox
  • 18,704
  • 23
  • 87
  • 147
10
votes
1 answer

Why does code that in 3.10 throws a RecursionError as expected not throw in earlier versions?

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 depth exceeded as I expected but 3.8 goes into a…
9
votes
3 answers

How to determine an active screen (monitor) of my Application (window) using python PyQt5?

I am working on an application which is using many widgets (QGroupBox, QVBoxLayout, QHBoxLayout). Initially it was developed on normal HD monitors. But, recently many of us upgraded to 4K resolution monitors. Now some of the buttons and sliders are…
9
votes
5 answers

How do you get Visual Studio Code to use different Python interpreter?

I'm new to VS Code/Python, and I'm trying to get VSCode to run a specific version of Python (seems I have multiple versions installed). I tried the following code: import sys print(sys.version) When I run the file, some reason, it shows: 3.5.2…
NL3294
  • 984
  • 1
  • 10
  • 27
8
votes
1 answer

Simple if statement on python interpreter

Environment: Fedora 27 (GNU/Linux) terminal python3.6.3 I am having problems running this simple lines of code in the python interpreter, this is an only if statement or alone if statement. n = 5 if n == 4: print('n=4') print('done') This…
5
votes
1 answer

python.pythonPath saying "unknown configuration setting" on VS code on Macbook M1

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 asked a similar question: Python Interpreter…
5
votes
2 answers

"WHY" 2 different executables of python of same version?

When I press tab on the command python3.7 I get the following python3.7 python3.7-config python3.7m python3.7m-config I looked up what's python3.7m and found the answer - https://stackoverflow.com/a/16677339/6849682. Next I go to…
bigbounty
  • 16,526
  • 5
  • 37
  • 65
5
votes
0 answers

importing python package with PythonInterpreter in java

i'm trying to using function from python code in java code (in Netbeans) by using PythonInterpreter and it worked fine when there is no any imported package in python code, but in my code where there is a package is need to import "tweepy" i got an…
s99
  • 119
  • 1
  • 1
  • 8
5
votes
1 answer

Pycharm says "tarfile.ReadError: file could not be opened successfully"

Today I tried to create a new python project unsing Pycharm, with Python3.2. But I figured out that something is wrong. When I tried to find the path of my python interpreter, I get that one: Python 3.2 (r32, Apr 18 2018) >>> import sys >>>…
Dadou
  • 175
  • 1
  • 13
5
votes
0 answers

java.lang.ClassCastException while using PythonInterpreter from Java

I am trying out to invoke python function passing it HashMap from within java (groovy). The python function squares every value in input map and returns Dictionary of squares with same keys. JythonTest.groovy import…
Mahesha999
  • 22,693
  • 29
  • 116
  • 189
4
votes
1 answer

Alternative for replit

I and my friend were working with a python project on replit We were working with some modules when we got an error saying that we had reached the maximum number of libraries stored in the server. Is there any good alternative to replit? the…
Ibrahim
  • 798
  • 6
  • 26
4
votes
5 answers

ModuleNotFoundError : no module named : crispy_forms

I can import crispy_forms but when I run python3 manage.py runserver it say no module named crispy_forms, I can not why it is, because when I pip3 list, I can see django-crispy-forms. so I attach my setup for interpreter, really need your help…
4
votes
3 answers

Lost my python.exe in Pycharm with Anaconda3

Everything was working perfectly until today, when for some reason my python.exe file disappeared from the Project Interpreter in Pycharm. It was located in C:\users\my_name\Anaconda3\python.exe, and for some reason I can't find it anywhere! Yet,…
JejeBelfort
  • 1,593
  • 2
  • 18
  • 39
4
votes
1 answer

Running a uWSGI app that uses uwsgidecorators from shell python directly

As you may know, uwsgidecorators are only working if your app is running in the context of uwsgi, which is not exactly clear from the documentation: https://uwsgi-docs.readthedocs.io/en/latest/PythonDecorators.html My code is using these decorators,…
Mugen
  • 8,301
  • 10
  • 62
  • 140
4
votes
0 answers

CMake finding wrong version of python

How can I fix the error of: CMake Error at /usr/local/Cellar/cmake/3.11.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find PythonInterp: Found unsuitable version "1.4", but required is at least "3" (found…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
1
2 3
8 9