Questions tagged [python-3.9]

A version of the Python programming language, first released on October 5, 2020. This tag is for issues that are specific to Python 3.9. For general questions use the more generic [python] and [python-3.x] tags.

3.9 was released on October 5, 2020 (PEP 596).


Use this tag if your question is specifically related to Python 3.9. Otherwise, use the following guidelines to determine which tag(s) you should add to your question:

  • If your question applies to Python in general, use only the tag.
  • If your question applies to Python 3.x but not to Python 2.x, add the tag .
  • If you aren't sure, tag your question with and mention which version you're using in the post.

References

1128 questions
4
votes
4 answers

disable dark mode in django admin

The Problem I installed Django after couple of months. Current version is 3.2.4. Earlier Django-admin was just light-mode. Current Django-admin switches automatically to dark or light according to system theme. Well, I do not want this behaviour. I…
ajinzrathod
  • 925
  • 10
  • 28
4
votes
0 answers

Cannot update from Python 3.7.6 to 3.9 (or anything above 3.7.6) on MacOS

This started from when I tried to use networkx and it would not work despite pip installing it and restarting the terminal. I then realized that the version on my OS is 3.7.6 At first, I tried upgrading it via installing 3.9.5 from python.org. Then…
Argileon
  • 63
  • 3
4
votes
1 answer

python3-wheel installed, still using legacy 'setup.py' when installing dlib

I've forked dlandon's Zoneminder project in order to build a Docker image using Debian Bullseye instead of Ubuntu, for i386 (I'm installing it into a 32-bit mini PC). Part of the requiriments is installing dlib (latest is 19.22.0). I've installed…
Amitie 10g
  • 81
  • 1
  • 7
4
votes
0 answers

Problem executing scripts APT after 'sudo apt update'

When I type sudo apt-get update, I get 2 errors, I have known from some similar questions that they're related to Python, all that is because I tried to replace python3.8 by python3.9 as the python by default version on my Ubuntu 20.04LTS. E:…
4
votes
0 answers

Attempting to decompile a python 3.9 .pyc binary

I have been really struggling trying to decompile one python 3.9 .pyc binary. Most tools that i've tried, such as: decompile3, uncompyle6, ..etc seem to all return me the error ImportError: Unknown magic number 23117 However, one of the tools did…
4
votes
3 answers

pipenv locking for NumPy fails on Python3.9 and pip21.0.1

When I try to install pandas via pipenv I get a bunch of numpy errors after the locking process. When I try to install bs4 via pipenv it works fine, but for some reason, it fails with pandas. I have tried deleting and reinstalling pipenv and…
cskid
  • 41
  • 1
  • 3
4
votes
2 answers

How does inheritance work in Python metaclass?

Suppose, I have a custom metaclass and a class linked to it: class Meta(type): pass class A(metaclass=Meta): pass From my understanding that at the end of the class A statement, the following steps are executed: Call Meta('A', (), {}). Because…
Henry Tjhia
  • 742
  • 1
  • 5
  • 11
4
votes
2 answers

Python 3.9.1 path variable

Good day! Installed the Python 3.9.1, checked "Add to path", the cmd did not work though. Added Environment Variable Path, both folder C:\Users\XXXXX\AppData\Local\Programs\Python\Python39 (file manager opens the path to python.exe just fine) and…
S_rp
  • 41
  • 1
  • 4
4
votes
1 answer

Unable to install Numpy

I'm unable to install NumPy. I'm getting the following error ERROR: Could not find a version that satisfies the requirement numpy (from versions: none) ERROR: No matching distribution found for numpy My python version is 3.9.0
Orpheus
  • 219
  • 1
  • 4
  • 9
3
votes
0 answers

RegexMatchError: get_throttling_function_name: could not find match for multiple

(Using pytube15.0.0) I am rerunning a code to download audio from YouTube using the following code: search_kw = tracks[i+1]['Artist'] + '+' + tracks[i+1]['Track Title'] print('Preparing ' + tracks[i+1]['Artist'] + '-' + tracks[i+1]['Track…
Anthony Reid
  • 89
  • 2
  • 9
3
votes
0 answers

How to import a module from a sibling directory that imports modules in its directory in Python 3.9 without modifying sys.path?

My project file structure looks something like this: hyphenated-project-root/ __init__.py src/ __init__.py module0.py > from module1 import MyClass > import module2 module1.py >…
3
votes
1 answer

Upgrading Python version to 3.9 on macOS now gives “variable not defined” error for some file-reading code

I just upgraded from Python 3.7 to 3.9.14 and it now gives a variable not defined error. The same code works fine locally and remotely where Python 3.9.2 is installed but now locally it gives an error in Python 3.9.14 version. Below is the code: def…
Volatil3
  • 14,253
  • 38
  • 134
  • 263
3
votes
1 answer

Python dictionary with fixed .keys() contents and variable arguments

I'm trying to read in a bunch of data from text files to a dictionary, and I've made a couple of small typos which end up creating new key/value pairs and breaking the program (which can be annoying and a pain to debug). This got me wondering if…
Pioneer_11
  • 670
  • 4
  • 19
3
votes
3 answers

Force an abstract class attribute to be implemented by concrete class

Considering this abstract class and a class implementing it: from abc import ABC class FooBase(ABC): foo: str bar: str baz: int def __init__(self): self.bar = "bar" self.baz = "baz" class Foo(FooBase): foo: str…
Jivan
  • 21,522
  • 15
  • 80
  • 131
3
votes
0 answers

"Unable to import module 'app': No module named 'app'", "errorType": "Runtime.ImportModuleError"

I have covered many different questions just like this on here and have still not come to a conclusion of what the problem is. I have two API's Classroom API Invites API Both API's use FastAPI with Magnum for the handler. I am using SAM CLI to…
Football52
  • 123
  • 3
  • 14