5,593 questions
1
vote
1
answer
77
views
How to make setup.py invoke C++ compiler instead of C?
I have no problem building native modules when using Python 3.11 on my FreeBSD desktop – invoking distutils.core.Extension with language = 'c++' is enough to have the C++ compiler invoked.
However, on ...
0
votes
1
answer
54
views
How to refer to source-files outside of Python module directory?
Our project builds a program from sources across multiple "sibling" subdirectories.
We'd like to make (a subset of) the same code accessible directly from Python-scripts. To that end, I ...
1
vote
1
answer
139
views
How to use pyproject.toml with python-3.6?
I created my simple Python-module. The pyproject.toml reads:
[project]
authors = [
{name = "Me Me", email = "[email protected]"}
]
name = "Mysms"
description = "...
0
votes
2
answers
327
views
How to install Old Python 3.6 debugger for vscode
I want to run python script (3.6.9) in vscode.
According to this site, My vscode's python Debugger is not support for python debugger,so I try to install old python debugger as in the diagram below,
...
2
votes
2
answers
147
views
Can't install matplotlib in Python 3.6
I've created a Python 3.6 environment in my WSL Ubuntu 22.04 operating system using virtualenv -p python3.6 <my_env>. I need to download some packages, particularly matplotlib, but I'm having ...
0
votes
1
answer
63
views
Python - Django - Encoding UTF-8
I have a problem with text encoding.
The context: I'm working on a django 1.11, python 3.6 app (it started in python 2.7 and django < 1.11 and was upgraded later).
I have to use an API that doesn't ...
1
vote
1
answer
69
views
TypeError: 'type' object is not subscriptable with prefetch_related
I’m trying to return a specific queryset using prefetch_related to optimize future queries, but I’m encountering an issue. When I don’t specify a return type, the code works fine. However, I want to ...
0
votes
1
answer
90
views
Unable to get pie chart to correctly format with matplotlib
my code is this:
plt.pie(df['Rainfall'].value_counts().values,
labels = df['Rainfall'].value_counts().index,
autopct='%1.1f%%')
plt.show()
df.groupby('Rainfall').mean()
...
0
votes
0
answers
318
views
What is the correct maxmem parameter value in Python's hashlib.scrypt method?
I am trying to use Python's hashlib.scrypt to hash passwords. According to OWASP the recommended settings for scrypt are
... use scrypt with a minimum CPU/memory
cost parameter of (2^17), a minimum ...
0
votes
1
answer
1k
views
Run Yolov8 for Python 3.6
Yolov8 is build to run with 3.8 or above and pip install ultralytics is not compatible with prior versions.
I have the constraint of using a prior version of Python to execute the code on a ...
-2
votes
2
answers
173
views
Can we use python f-string placeholder with index number? [closed]
How can we achieve the following in Python 3.6 using f-string (instead of using format()) method?
quantity = 3
itemno = 567
price = 49
myorder = "I want {0} pieces of item number {1} for {2:.2f} ...
0
votes
2
answers
140
views
I am not able to display and save a video from my Flir hadron camera using Gstreamer command in python3 Opencv
I'm trying to display and save my Flir Hadron camera videos using gstreamer pipelines in Python 3 OpenCV. I have a perfectly working Gstreamer pipelines that are able to display and save videos with ...
0
votes
0
answers
35
views
oifits module for python3
when I open a *.fits file in OIFitsExplorer, I obtain a structure as in the figure.
How can I get data only from GRAVITY_SC_P1 in oifits python3 module?
I access the data as follows:
target = "...
0
votes
0
answers
19
views
How do you import pictures to Python console without other software/add-ons
I have looked forever and nothing helps to print/add pictures to Python. I don't want to download software or add-ons just plain Python. I have also tried AI and it doesn't help. (PS. I am in Python 3....
1
vote
1
answer
705
views
Install python3.6.8 failed in MacOS Sonoma useing pyenv
I'm trying to install python3.6.8 onto a Mac using pyenv. However, I'm getting the error:
BUILD FAILED (OS X 14.3.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/...