-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbridges_setup_python_pycharm.html
146 lines (142 loc) · 5.59 KB
/
bridges_setup_python_pycharm.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<title>BRIDGES Python Setup Page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- w3IncludeHTML() -->
<script src="https://www.w3schools.com/lib/w3data.js"></script>
<!-- all pages need those. -->
<link rel="stylesheet" type="text/css" href="./assets/css/bridges.css">
<link rel="stylesheet" type="text/css" href="./assets/css/nav.css">
<link rel="stylesheet" type="text/css" href="./assets/css/glyphicon.css">
<link rel="stylesheet" type="text/css" href="./assets/css/footer.css">
</head>
<body>
<div w3-include-html="./navbar.html">
<script>
w3IncludeHTML();
</script>
</div>
<h2>BRIDGES(Python): Using PyCharm </h2>
<table class = "setup_table-part1">
<thead>
<tr>
<b>Step 1: Install PyCharm </b>
<ul> <li> If you do not have Pycharm
installed,
<a href = "https://www.jetbrains.com/pycharm/"> download Pycharm </a>
and install it on your computer.
</ul>
</tr>
<tr>
<b>Step 2: Create Bridges Account</b>
<ul> <li> Visit the Bridges
<a href = "http://bridgesuncc.github.io">
main page</a> and create yourself an account
by clicking the login button
on the top navigation bar. <b>Please ensure that
your user id is devoid of spaces, as it will be
used as part of the web link for your projects.</b>
After creating your account, click on your profile
name in the upper right corner to view your
profile. Once in your profile, you will see your
API Key; you will need this API key in part 2
of the tutorial(as well as in every BRIDGES program
you write).
</ul>
</tr>
<tr>
<td class = "col-md-2"> <b>Step 3a: Pycharm Environment Setup </b>
<ul>
<li> Open the Pycharm application, you should see something like this:
</ul>
</td>
<td class = "col-md-8">
<img src = "./img/bridges_setup/pycharm/init_window.png" width = "800"></img>
</td>
</tr>
<tr>
<td class = "col-md-2"> <b>Step 3b: Create project, check Python interpreter,
environment location </b>
<ul>
<li> Create a new project, name it appropriately, note its location on your
filesystem and click <i> Create</i>
<li> Note: your system should have python 3.8 or higher installed for
BRIDGES to work properly.
<li> Make sure that Pycharm has an interpreter by looking at the entry
for <i> Base interpreter</i> in this window
</ul>
</td>
<td class = "col-md-8">
<img src = "./img/bridges_setup/pycharm/interpret_set.png" width = "800"></img>
</td>
</tr>
<tr>
<td class = "col-md-2"> <b>Step 3c: Running Hello World. </b>You will see a
default python program; You should be able to run this by clicking the
<b>play</b> button on the top right</b>
</td>
<td class = "col-md-8">
<img src = "./img/bridges_setup/pycharm/main_win.png" width = "800"></img>
</td>
</tr>
<tr>
<td class = "col-md-2"> <b>Step 3d: Import Bridges Packages</b>
Next we will import the bridges and related packages as follows:
<ul>
<li> Click on the Pycharm's (main application) <i>Preferences (OSX)</i>
button. On MS Windows, it is under <b> File-->Settings</b>.
Then click on
<i> Python Interpreter</i>. You will see the
adjacent image with the default packages required by the base system.
<li> We will next import the BRIDGES packages; for this click on the <b>+</b>
button and you will see another popup window with a <b>search bar</b>
at the
top; type <b>bridges</b> (see adjacent window), and once you click on that
you can hit the <i>Install Package</i> at the bottom left to install
the Bridges package. You will see the packages installed as in the
adjacent image. Go back to the main code window.
</ul>
</td>
<td class = "col-md-8">
<img src = "./img/bridges_setup/pycharm/packages.png" width = "800"></img>
<img src = "./img/bridges_setup/pycharm/bridges1.png" width = "800"></img>
<img src = "./img/bridges_setup/pycharm/bridges2.png" width = "800"></img>
</td>
</tr>
<tr>
<td class = "col-md-2"> <b>Step 4a: Load and run an example BRIDGES program</b>
<ul>
<li> Go to this
<a href = "https://bridgesuncc.github.io/tutorials/testing/python/tut_sllist_p1.py.html">
BRIDGES Tutorial</a> site and copy/paste a python tutorial program into
the main window.
<li> Set an assignment number, and your credentials in the line that creates
the Bridges object at the beginning of the program.
<li> Run the program by hitting the <b> play </b>
<li> You will see a link printed on the console. Use that to visualize the
output.
</td>
<td class = "col-md-8">
<img src = "./img/bridges_setup/pycharm/bridges_program.png" width = "800"></img>
<img src = "./img/bridges_setup/pycharm/run_bridges.png" width = "800"></img>
</td>
</tr>
<tr>
<td class = "col-md-2"> <b>Running additional BRIDGES programs. </b>
<ul>
<li> Look at the <a href="https://bridgesuncc.github.io/tutorials/Overview.html"> BRIDGES Tutorials</a> pages for additional BRIDGES programs.
<li> When you create subsequent BRIDGES programs, <b>you can reuse the environment you
created above for your first BRIDGES program</b>. During the
environment setup <b>(Step 3b)</b> pick the environment you created
for the first project. This will let you use the BRIDGES packages
from the environment; else you will have to install BRIDGES again!
</ul>
<td>
</tr>
</tbody>
</table>
<div w3-include-html="./footer.html"></div>
</body>
</html>