How can I use Visualizer on my PC? When I just ran given python code(vis.py in line.zip), I had syntax error. There is a link: https://oj.uz/problem/view/IOI19_line
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
How can I use Visualizer on my PC? When I just ran given python code(vis.py in line.zip), I had syntax error. There is a link: https://oj.uz/problem/view/IOI19_line
Name |
---|
You have to run it in Python 3:
pip3 install matplotlib
python3 vis.py [ARGS]
I ran it in Python 3.9.1(64bit). Should this work?
I had a syntax error because of "pip3 install matplotlib".
I think you misunderstood something.
pip
is Python's package installer, so you should be able to use it in the terminal (cmd in windows) if it's installed correctly. Typepip3 install matplotlib
in your terminal, not in your code file. If that says something likepip3 not found
, try justpip install matplotlib
. Since you are getting syntax error,python3
command probably works. So after installing the matplotlib package, just run the code withpython3 vis.py [args]
(note that this command should be run in the same directory asvis.py
).cmd says: "'pip3' is not recognized as an internal or external command, operable program or batch file."
I tried "pip install matplotlib" also, but it said the same thing.
Interesting, since pip should already ship with python. Try
python3 -m pip install
and repeat the process. If it complains about python3 (windows usually usespython
) try justpython
.