• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Python Questions

Daniel Duffy

C++ author, trainer
Joined
10/4/07
Messages
10,091
Points
648
I have downloaded

1. Text editor Anaconda
2. Visual Studio Python

2. has nice IDE but I don't know how to install NumPy etc.
1. looks complete + all libraries but is a text editor (which is not to nice).

Ideally, I want to use both options in a Visual IDE. Any ideas?

Thanks!
 
I have downloaded

1. Text editor Anaconda
2. Visual Studio Python

2. has nice IDE but I don't know how to install NumPy etc.
1. looks complete + all libraries but is a text editor (which is not to nice).

Ideally, I want to use both options in a Visual IDE. Any ideas?

Thanks!
I like PyCharm for Python development. It's a visual IDE and has a built-in tool to easily download packages such as numpy or scipy.
 
I think you can choose Anaconda equipped with ipython, where you could download any libraries with conda command, say, conda install numpy, then you could have several available versions ready for download.
I installed Anaconda and the libraries install is very easy. I will check out ipython (it's an IDE?).
 
I have downloaded

1. Text editor Anaconda
2. Visual Studio Python

2. has nice IDE but I don't know how to install NumPy etc.
1. looks complete + all libraries but is a text editor (which is not to nice).

Ideally, I want to use both options in a Visual IDE. Any ideas?

Thanks!
Anaconda has most of the libraries that you need. If you want to check that, go to the Start Menu -> Anaconda -> Anaconda Prompt

It will open a special cmd.exe shell with Ananconda setup properly. Enter the command:

C:\> conda list

and it will show you all the libraries already installed in your original conda environment.

If you want to install new packages, you should try conda install. This is the default installer for python packages inside Anaconda. If conda can't find the package you want to install, then you try pip. The advantage of using conda is that it will try to install precompiled libraries for your operating system if they are needed (either fortran/C/C++ libraries). If you use pip and you need a package that uses Fortran/C/C++, you will need to have your environment setup with a Fortran or a C/C++ compiler and that could be messy/hard if you are using Windows.
 
ipython is a python shell/REPL (Read-Eval-Print-Loop). you can type commands/edit functions and get results immediately.

you should try Jupyter Notebooks also.
My workflow is usually PyCharm and Jupyter Notebook for immediate results.
 
Sounds like you're up and running but I'll say it - personally I'd use something like the following Python, Pip, virtualenv installation on Windows

Then install Atom, which gives an IDE style environment + nice editor that works with your python installation and where you can put in the ide-python package.

This way you get Atom's IDE but also if you need to install python packages (I still find myself needing to whenever I find some useful code) it can be done slickly as you have 'pip install' and easy_install.

If you find you're constantly looking at code that requires updates and the updates are a nightmare, consider restarting and doing the above. Honestly, a while back I had a python installation where just adding one package was about as much fun as sweeping a floor with the broom up my bum - after using the above link I had something like 5 python packages installed within the first 1/2 hr.
 
Last edited:
I am looking for books on Numpy and Scipy, with focus on the numerical algorithms and background. I am not interested in having to wade in syntax before getting to these topics.

Any suggestions? Thx!
 
Back
Top