W
W
WeBBeW2022-04-10 13:35:48
ubuntu
WeBBeW, 2022-04-10 13:35:48

How to run qiwi script on ubuntu through required python version?

I'm using
* Ubuntu 16
* Python 3.9.0a1 (default, Apr 10 2022, 12:51:41 pm)
[GCC 5.4.0 20160609] on linux

To run the script I write in the console:

screen -S abc
python3.9 test.py

and throws an error

Traceback (most recent call last):
  File "/root/test_.py", line 12, in <module>
    from pyqiwip2p import QiwiP2P
  File "/usr/local/lib/python3.9/site-packages/pyqiwip2p/__init__.py", line 1, in <module>
    from pyqiwip2p.Qiwip2p import QiwiP2P
  File "/usr/local/lib/python3.9/site-packages/pyqiwip2p/Qiwip2p.py", line 19, in <module>
    class QiwiP2P:
  File "/usr/local/lib/python3.9/site-packages/pyqiwip2p/Qiwip2p.py", line 118, in QiwiP2P
    pay_sources: list[str] = None,
TypeError: 'type' object is not subscriptable

if run via python3.5 then
python3.5 test.py
  File "test.py", line 233
    print(f"ID: {id} | error: {ex}")
                                           ^
SyntaxError: invalid syntax


how to run through 3.9?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MAD_CHE, 2022-04-10
@MAD_CHE

I just ran into a problem that on version 3.7 I got the same errors.
And through version 3.9 the script started.
Installed the kivy library like this:

sudo apt install python3.9-distutils
apt install curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.9 get-pip.py
python3.9 -m pip install pyqiwip2p

And launched, as usual, like this:
python3.9 main.py

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question