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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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
.