Number error
AbdulRahman7861234 opened this issue · 1 comments
When run the python code, get-pip.py, get the following error:
1
2
3
4
5
[1, 2, 3, 4, 5]
Traceback (most recent call last):
File "C:\Users\AbdulRahman\python\get-pip.py", line 32321, in
main()
File "C:\Users\AbdulRahman\python\get-pip.py", line 135, in main
bootstrap(tmpdir=tmpdir)
File "C:\Users\AbdulRahman\python\get-pip.py", line 111, in bootstrap
monkeypatch_for_cert(tmpdir)
File "C:\Users\AbdulRahman\python\get-pip.py", line 92, in monkeypatch_for_cert
from pip.internal.commands.install import InstallCommand
File "C:\Users\ABDULR~1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_internal\commands_init.py", line 9, in
File "C:\Users\ABDULR1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_internal\cli\base_command.py", line 13, in 1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich\traceback.py", line 31, in
File "C:\Users\ABDULR
^
File "C:\Users\ABDULR1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich\columns.py", line 7, in 1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich\console.py", line 63, in
File "C:\Users\ABDULR
File "C:\Users\ABDULR1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich\scope.py", line 7, in 1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich\table.py", line 17, in
File "C:\Users\ABDULR
File "C:\Users\ABDULR~1\AppData\Local\Temp\tmp8gf3k04j\pip.zip\pip_vendor\rich_ratio.py", line 2, in
File "C:\Users\AbdulRahman\AppData\Local\Programs\Python\Python311\Lib\fractions.py", line 6, in
from decimal import Decimal
File "C:\Users\AbdulRahman\AppData\Local\Programs\Python\Python311\Lib\decimal.py", line 3, in
from _decimal import *
AttributeError: module 'numbers' has no attribute 'Number'. Did you mean: 'numbers'?
Hi! :)
Do you have a numbers.py file in the folder you're running this script in?
Specifically, C:\Users\AbdulRahman\python\numbers.py
Python might be importing that module, when there's an import numbers
, which shadows https://docs.python.org/3/library/numbers.html (a module with the same name in the Python standard library)!
Consider renaming the numbers.py file in your python
folder, or run get-pip.py from a different directory.