Setup Devenv m3 v3 PDF
Setup Devenv m3 v3 PDF
A lot of the things you do here, you will also do when you set
yourself up at an in-office internship too. Look like an amazing hire
when you breeze through dev environment setup!
(Mac)
Setting up your dev environment for task
3
(Windows) (Linux)
Setting up your dev environment for task Setting up your dev environment for task
3 3
JPMorgan Chase Software Engineering Virtual Experience
● First you must have git installed in your system. Git is used by most
programmers to collaborate with code in software projects. To install, follow
this quick guide. You know you have installed successfully when you get a
version output on your terminal by typing `git --version`:
Setting up your dev environment for the program!
● This command will download the code repositories from github to your
machine in the current working directory of the terminal you executed the
command in. Downloading the 2 repositories above will give you options later
Setting up your dev environment for the program!
note: the image here just does not contain the other repository but it
should if you did the previous slides and execute the ls command. `ls`
just lists the files/folders in the current directory
Setting up your dev environment for the program!
note: If you choose to work using python3 and your system has version
python3 as default instead of python2.7.x, then choose to go into the
other repository you downloaded instead. (otherwise, use the other repo
above); cd changes directory your terminal is in. For more info on how
to use cd, check this
cd JPMC-tech-task-3-py3
Setting up your dev environment for the program!
python --version
If ever you encounter an error when starting the server application, see troubleshooting in this slide
Setting up your dev environment for the program!
● To be clear, the server application isn’t stuck. It’s behaving perfectly normal
here. The reason why it’s just like that for now is because it’s just listening for
requests
● To install node and npm and be able to manage versions seamlessly we will
install NVM (node version manager). Once this is on your machine you can
basically install any version of node and npm and switch depending on a
project’s needs. Follow these instructions for to install nvm for mac.
note:you might need to have Xcode also installed in your system (https://github.com/nvm-sh/nvm#important-notes)
Setting up your dev environment for the program!
● You should end up with a similar result in the next slide after doing the
commands above
Setting up your dev environment for the program!
node -v
npm -v
Take note: If you open a new terminal after all this, make sure to recheck your node version and npm version. It
might be the case you’ve switched to a different version so just execute `nvm use v11.0.0` again if ever...
Setting up your dev environment for the program!
npm install Note: If npm install succeeded for you (i.e. no errors) you don’t have
to do it again… But it always has to be successful first before you
execute npm start
npm start
● If all goes well (and it should), you should end up with a similar result in the
next slide. See troubleshooting slides if you encounter any problems with
npm install
Setting up your dev environment for the program!
Note: This part assumes no errors came out of npm install. Some data should show if you click on the
“Start Streaming Data” button. If nothing is showing, check the terminal where you’re running the server
and see if anything printed out, like “Query received”. If there’s something like that and you’re not seeing
results, then try using a different browser (e.g. Chrome/Firefox) and checking localhost:3000. If no response
like “Query received” got printed in the terminal running the server, you might be experiencing this issue.
Setting up your dev environment for the program!
● If you did encounter issues, check if the commonly encountered issues listed
in the next few slides will solve your problem:
○ dateutil dependency
○ npm install or npm start errors
○ Socket unavailable
Setting up your dev environment for the program!
In this case, you must install pip first. pip is python’s package manager for
installing python dependencies. Make sure you install pip for the right Python
version you’re working with in this project. You can check your pip version by
pip --version and it will tell which python version it maps too
Setting up your dev environment for the program!
If you don’t have curl, just install it in your system. For mac, it’s this way
Then just run the script using python:
//if python --version = 2.7+ this will install pip for python2
//if python --version = 3+ this will install pip for python3
python get-pip.py
Afterwards, you can rerun the server and then rerun the client
Note: For the command above, whatever python version your pip corresponds to (i.e. the output
of pip --version, that is the python version that will have the dependency installed). So if you’re
pip corresponds to python2.7.x then doing the command above will install python-dateutil for
python2.7.x
Setting up your dev environment for the program!
● In our setup node-gyp is called by way of npm, so in order for you to avoid the
error, you have to explicitly tell npm what python version to use. Thus, you
have to set npm's 'python' config key to the appropriate value:
● It could help that you also temporarily remap your python3.x to the command
python3 if you also have it in your system. This is also discussed in the
github thread mentioned in the earlier bullet point.
Setting up your dev environment for the program!
● CASE B: If you’re having a problem similar to this situation, most likely, you
aren’t running the server application alongside the client app. Make sure you
have another terminal open wherein you’re running the server app which is
run via python datafeed/server.py or python datafeed/server3.py
If running the server app errors out for you might be experiencing this other
problem (see linked slide)
Setting up your dev environment for the program!
● Then replace the node_modules inside your copy of the repo with the one you
downloaded
● Afterwards, you can go ahead and just execute npm start (no need to run
npm install)
Setting up your dev environment for the program!
note: the example here is from windows but a similar error might appear for mac
This is most likely because you have a firewall open preventing you from accessing 8080. You can try the
following workarounds:
- Temporarily turn off your firewall
- Using any text editor, open the datafeed/server.py in the repository using your code editor and look for
the line where it says port = 8080. change that to port = 8085
- Similarly, open the src/DataStreamer.ts and change the line where it has 8080 to 8085
Setting up your dev environment for the program!
In this case make sure you're only running one instance of the server.py because it hooks itself to port 8080,
and once that port is used nothing else can use it. If you want to free that up, terminate the old server.py
you're running from one of your terminals by hitting cmd+c. Alternatively you can kill the process listening on
a port (i.e. in this case 8080) by following this guide
Setting up your dev environment for the program!
● You can also submit your query in the module page’s support modal that pops
out when you click the floating element on the page (see image below)
JPMorgan Chase Software Engineering Virtual Experience
● First you must have git installed in your system. Git is usually used by
programmers to collaborate with code in a software project.To do this, follow this
quick guide. You know you have installed successfully when you get this output
on your command line (cmd). (any git version should suffice but the latest is recommended)
Setting up your dev environment for the program!
● This command will download the code repositories from github to your
machine in the current working directory of the terminal you executed the
command in. Downloading the 2 repositories above will give you options later
Setting up your dev environment for the program!
note: the image here just does not contain the other repository but it
should if you did the previous slides and execute the dir command. `dir`
just lists the files/folders in the current directory
Setting up your dev environment for the program!
note: If you choose to work using python3 and your system has version
python3 or above instead of python2.7.x, then choose to go into the other
repository you downloaded instead. (otherwise, use the other repo above);
cd changes directory your terminal is in. For more info on how to use cd,
check here
cd JPMC-tech-task-3-py3
Setting up your dev environment for the program!
python --version
If ever you encounter an error when starting the server application, see troubleshooting in this slide
Setting up your dev environment for the program!
● To be clear, the server application isn’t stuck. It’s behaving perfectly normal
here. The reason why it’s just like that for now is because it’s just listening for
requests
● To install node and npm and be able to manage versions seamlessly we will
install NVM (node version manager). Once this is on your machine you can
basically install any version of node and npm and switch depending on a
project’s needs. Follow these instructions to install nvm for windows.
Setting up your dev environment for the program!
● You should end up with a similar result in the next slide after doing the
commands above
Setting up your dev environment for the program!
node -v
npm -v
Take note: If you open a new terminal after all this, make sure to recheck your node version and npm version. It
might be the case you’ve switched to a different version so just execute `nvm use v11.0.0` again if ever...
Setting up your dev environment for the program!
● We have to install Visual C++ Build Environment via Visual Studio Build
Tools. Run the downloaded .exe file and make sure to have the basics
installed i.e "Visual C++ Build Tools on your machine. This is actually need
because of node-gyp. After installing, make sure to run in your command line:
npm install
npm start
● If all goes well , you should end up with a similar result in the next slide. If you
you encounter problems with npm install, particularly relating to node-gyp try
the other windows options of installing here. If there are other issues, please
refer to the Troubleshooting slides in this guide.
Setting up your dev environment for the program!
Note: This part assumes no errors came out of npm install. Some data should show if you click on the
“Start Streaming Data” button. If nothing is showing, check the command line where you’re running the
server and see if anything printed out, like “Query received”. If there’s something like that and you’re not
seeing results, then try using a different browser (e.g. Chrome/Firefox) and checking localhost:3000. If no
response like “Query received” got printed in the command line running the server, you might be
experiencing this issue.
Setting up your dev environment for the program!
● If you did encounter issues, check if the commonly encountered issues listed
in the next few slides will solve your problem:
In this case, you must install pip first. pip is python’s package manager for
installing python dependencies. Make sure you install pip for the right Python
version you’re working with in this project. You can check your pip version by
pip --version and it will tell which python version it maps too
Setting up your dev environment for the program!
If you don’t have curl, just copy a python file, rename it to get-pip.py and replace
all the contents of the python file to what’s in get-pip.py
//if python --version = 2.7+ this will install pip for python2
//if python --version = 3+ this will install pip for python3
python get-pip.py
○ Make sure you open a new command line too and use that instead after doing this
● To edit your system path environment variable it’s similar to the slides here.
● Alternatively you can access it doing something like:
○ C:\\Python27\Scripts\pip.exe <parameters> (similar for python3x if it was installed in C:\\)
○ <parameters> could be something like C:\\Python27\Scripts\pip.exe install python-dateutil
○ Take note though, this assumes that you have your python installed in drive C:\\
Setting up your dev environment for the program!
Afterwards, you can rerun the server and then rerun the client
Note: For the command above, whatever python version your pip corresponds to (i.e. the output
of pip --version, that is the python version that will have the dependency installed). So if you’re
pip corresponds to python2.7.x then doing the command above will install python-dateutil for
python2.7.x
Setting up your dev environment for the program!
● In our setup node-gyp is called by way of npm, so in order for you to avoid the
error, you have to explicitly tell npm what python version to use. Thus, you
have to set npm's 'python' config key to the appropriate value:
● It could help that you also temporarily remove in that same path variable the
mapping to python3.x if you also have it in your system. Just place it back
after you npm install successfully and if you plan on using the py3 version of
the repository...
Setting up your dev environment for the program!
● CASE B: If you’re having a problem similar to this situation, most likely, you
aren’t running the server application alongside the client app. Make sure you
have another terminal open wherein you’re running the server app which is
run via python datafeed/server.py or python datafeed/server3.py
If running the server app errors out for you might be experiencing this other
problem (see linked slide)
Setting up your dev environment for the program!
Case C: This problem is most likely due to the fact that you’re in
C:\\Windows\System32. Do not clone the repo here as mentioned. Clone in
C:\\Users\<some_account>\ instead.
Setting up your dev environment for the program!
● Then replace the node_modules inside your copy of the repo with the one you
downloaded (make sure the folder is still named node_modules in your repo)
● Afterwards, you can go ahead and just execute npm start (no need to run
npm install)
Setting up your dev environment for the program!
This is most likely because you have a firewall open preventing you from accessing 8080. You can try the
following workarounds:
- Temporarily turn off your firewall
- Using any text editor, open the datafeed/server.py in the repository using your code editor and look for
the line where it says port = 8080. change that to port = 8085
- Similarly, open the src/DataStreamer.ts and change the line where it has 8080 to 8085
Setting up your dev environment for the program!
In this case make sure you're only running one instance of the server.py because it hooks itself to port 8080,
and once that port is used nothing else can use it. If you want to free that up, terminate the old server.py
you're running from one of your terminals by hitting ctrl+c. Alternatively you can kill the process listening on a
port (i.e. in this case 8080) by following this guide
Setting up your dev environment for the program!
● You can also submit your query in the module page’s support modal that pops
out when you click the floating element on the page (see image below)
JPMorgan Chase Software Engineering Virtual Experience
First you must have git installed in your system. Git is usually used by
programmers to collaborate with code in a software project. You can do install
git by simply running the command below in your terminal (ctrl+alt+t):
● You’ll know you have git if you get a similar result on your terminal:
Setting up your dev environment for the program!
● This command will download the code repositories from github to your
machine in the current working directory of the terminal you executed the
command in. Downloading the 2 repositories above will give you options later
Setting up your dev environment for the program!
● To access the files inside from the terminal, just change directory by typing:
cd JPMC-tech-task-3
note: If you choose to work using python3 and your system has
version python3 or above instead of python2.7.x, then choose to
go into the other repository you downloaded instead. (otherwise,
use the other repo above); cd changes directory your terminal is
in. Check this for more info on how to use cd
cd JPMC-tech-task-3-py3
Setting up your dev environment for the program!
python --version
If ever you encounter an error when starting the server application, see troubleshooting in this slide
Setting up your dev environment for the program!
● To be clear, the server application isn’t stuck. It’s behaving perfectly normal
here. The reason why it’s just like that for now is because it’s just listening for
requests
● To install node and npm and be able to manage versions seamlessly we will
install NVM (node version manager). Once this is on your machine you can
basically install any version of node and npm and switch depending on a
project’s needs. Follow these instructions to install nvm for linux.
Setting up your dev environment for the program!
● You should end up with a similar result in the next slide after doing the
commands above
Setting up your dev environment for the program!
node -v
npm -v
Take note: If you open a new terminal after all this, make sure to recheck your node version and npm version. It
might be the case you’ve switched to a different version so just execute `nvm use v11.0.0` again if ever...
Setting up your dev environment for the program!
npm install
npm start
● If all goes well (and it should), you should end up with a similar result in the
next slide. If there are other issues, please refer to the Troubleshooting slides
in this guide.
Setting up your dev environment for the program!
Note: This part assumes no errors came out of npm install. Some data should show if you click on the
“Start Streaming Data” button. If nothing is showing, check the command line where you’re running the
server and see if anything printed out, like “Query received”. If there’s something like that and you’re not
seeing results, then try using a different browser (e.g. Chrome/Firefox) and checking localhost:3000. If no
response like “Query received” got printed in the command line running the server, you might be
experiencing this issue.
Setting up your dev environment for the program!
● If you did encounter issues, check if the commonly encountered issues listed
in the next few slides will solve your problem:
○ dateutil dependency
○ npm install or npm start errors
○ Socket unavailable
Setting up your dev environment for the program!
In this case, you must install pip first. pip is python’s package manager for
installing python dependencies. Make sure you install pip for the right Python
version you’re working with in this project. You can check your pip version by
pip --version and it will tell which python version it maps too
Setting up your dev environment for the program!
If you don’t have curl, just install it in your system. For linux, it’s this way
Then just run the script using python:
//if python --version = 2.7+ this will install pip for python2
//if python --version = 3+ this will install pip for python3
python get-pip.py
Afterwards, you can rerun the server and then rerun the client
Note: For the command above, whatever python version your pip corresponds to (i.e. the output
of pip --version, that is the python version that will have the dependency installed). So if you’re
pip corresponds to python2.7.x then doing the command above will install python-dateutil for
python2.7.x
Setting up your dev environment for the program!
● In our setup node-gyp is called by way of npm, so in order for you to avoid the
error, you have to explicitly tell npm what python version to use. Thus, you
have to set npm's 'python' config key to the appropriate value:
● It could help that you also temporarily remap your python3.x to the command
python3 if you also have it in your system. This is also discussed in the github
thread mentioned in the earlier bullet point.
Setting up your dev environment for the program!
● CASE B: If you’re having a problem similar to this situation, most likely, you
aren’t running the server application alongside the client app. Make sure you
have another terminal open wherein you’re running the server app which is
run via python datafeed/server.py or python datafeed/server3.py
If running the server app errors out for you might be experiencing this other
problem (see linked slide)
Setting up your dev environment for the program!
● Then replace the node_modules inside your copy of the repo with the one you
downloaded
● Afterwards, you can go ahead and just execute npm start (no need to run
npm install)
Setting up your dev environment for the program!
note: the example here is from windows but a similar error might appear for linux
This is most likely because you have a firewall open preventing you from accessing 8080. You can try the
following workarounds:
- Temporarily turn off your firewall
- Using any text editor, open the datafeed/server.py in the repository using your code editor and look for
the line where it says port = 8080. change that to port = 8085
- Similarly, open the src/DataStreamer.ts and change the line where it has 8080 to 8085
Setting up your dev environment for the program!
In this case make sure you're only running one instance of the server.py because it hooks itself to port 8080,
and once that port is used nothing else can use it. If you want to free that up, terminate the old server.py
you're running from one of your terminals by hitting ctrl+c. Alternatively you can kill the process listening on a
port (i.e. in this case 8080) by following this guide
Setting up your dev environment for the program!
● You can also submit your query in the module page’s support modal that pops
out when you click the floating element on the page (see image below)