Questions tagged [python-3.9]

The latest version of the Python programming language. 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

453 questions
4
votes
3 answers

How can I run Python 3.9.1 natively on M1 Mac?

Seems to be impossible currently with Anaconda as well as with Xcode 12. Via idle, it runs via Rosetta. There seems to be no discussion of this so either I'm quite naive or maybe this will be useful to others as well. Python says: "As of 3.9.1,…
hithisispeter
  • 41
  • 1
  • 3
4
votes
1 answer

Python 3.9 and Pycharm, HTMLParser AttributeError

When trying to create new python 3.9 Virtualenv Environment in Pycharm I got such error AttributeError: 'HTMLParser' object has no attribute 'unescape' Traceback (most recent call last): File…
Headmaster
  • 1,260
  • 3
  • 16
  • 38
4
votes
2 answers

How can I install Python 3.9 from the Anaconda prompt?

Python 3.9.0rc1 has been released today, according to the official website. Is there a way I can use it in an Anaconda environment? I tried conda create --name python39 python==3.9 But it says: ERROR: Could not find a version that satisfies the…
Nicolas Gervais
  • 21,923
  • 10
  • 61
  • 96
4
votes
2 answers

Get local time zone name on Windows (Python 3.9 zoneinfo)

Checking out the zoneinfo module in Python 3.9, I was wondering if it also offers a convenient option to retrieve the local timezone (OS setting) on Windows. On Linux, you can do from datetime import datetime from zoneinfo import ZoneInfo naive =…
MrFuppes
  • 11,829
  • 3
  • 17
  • 46
3
votes
1 answer

python input prompt string length

How to increase maximum length of string that can be put into prompt from input function? I have a following test script if __name__ == "__main__": a = input('test input:') print(a) and I can insert only 1024 characters into prompt, the…
pieca
  • 2,167
  • 1
  • 13
  • 29
3
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
  • 734
  • 1
  • 2
  • 10
3
votes
1 answer

typing.Any in Python 3.9 and PEP 585 - Type Hinting Generics In Standard Collections

I am trying to understand if the typing package is still needed? If in Python 3.8 I do: from typing import Any, Dict my_dict = Dict[str, Any] Now in Python 3.9 via PEP 585 it's now preferred to use the built in types for collections hence: from…
garyj
  • 924
  • 2
  • 8
  • 18
3
votes
2 answers

Can't install tensorflow on python 3.9

When I try to install tensorflow on python 3.9 I get following error: ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow Is not there any tensorflow…
3
votes
2 answers

I'm trying to install Kivy with Python 3.9.0 and it gives me an error after I type: python -m pip install kivy

I'm on Windows 10. I was following the instructions on https://kivy.org/doc/stable/installation/installation-windows.html# and I reached the part where it says: Install Kivy: python -m pip install kivy==1.11.1 After I type it in cmd, it gives me an…
khalrab27
  • 43
  • 1
  • 6
3
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
  • 155
  • 1
  • 6
3
votes
1 answer

failed building wheel for psycopg2

I need to download the package psycopg2 in order to work with the postgresql database in use. Unfortunately, when I try to pip install psycopg2 the following error pops up: failed building wheel for psycopg2 my os: windows log Building wheel…
nn.ff
  • 41
  • 4
2
votes
1 answer

What is the purpose of bitwise_or in Python PEG?

What does bitwise_or mean in PEG grammar? More accurately, there are lots of bitwise_or in contexts where it's not even parsing for | yet there are occurrences. Does bitwise_or serve any other purpose in PEG other than being the | in Python? Example…
Shreyan Avigyan
  • 102
  • 1
  • 9
2
votes
1 answer

In python 3.9+, how to write a type alias for the builtin tuple type with ellipsis? (mypy bug?)

Short version tuple[int, ...] is a valid type in python 3.9+ but mypy rejects a type alias for that. E.g. consider: Thing = tuple[int, ...] This results in "error: Unexpected '...'" (though python itself will load the module just fine). Is this a…
gimboland
  • 1,505
  • 2
  • 15
  • 24
2
votes
1 answer

Open JupyterNotebook from VScode into the Browser

I have opened my .ipynb file with vscode (Python 3.9 Interpreter - installed jupyterlab), it's connected locally, how can I open it through the browser? what is the default port?
2
votes
0 answers

Is there a way of rotating ImageTk after it has been defined?

rather than writing something along the lines of: tkimage = ImageTk.PhotoImage(image.rotate(angle)) it would be far more effective in my code to use something like: tkimage = ImageTk.PhotoImage(image).rotate(angle) as all of the images are set up…
1
2
3
30 31