which is more useful in the real world? Python or C++...

which is more useful? Python or C++

  • Python

  • C++

Results are only viewable after voting.

Daniel Duffy

C++ author, trainer
Yeah, I did pip install indeed. Ok, Anaconda will be next, but VS is already set up and I'm sure it's a small issue..


Well-Known Member
It could be that VS is looking at a different python interpreter than the one you pip-installed xlwings into. The usual approach is to have a virtualenv with the necessary packages installed and telling VS where to look for it. I haven't used VS before (I'm a PyCharmer as well), but this page might point you in the right direction for VS: How to create and manage Python environments in Visual Studio
If you decide to go the Anaconda route, use conda environments:



C++ Student
Python is a great language, especially for recent years open source development which greatly enlarge the community of this language. Even now stable system is also possible to be implemented in Python.

However you have to change your mindset when you program in python. For example, always avoid loop and take advantages of the numpy array for SIMD instruction. (it will be faster than your loop in C++. try it yourself)... Basically all these packages in Python are wrapping all these famous fortran/C/C++ packages such as nlopt and blas whcih were writen by numerical experts for decades and there is no way you can write codes faster than that in C++. If you think you can do better don't fool yourself...

Coding in numpy is like coding in Q(the language for KDB). It is just so convenient, interface friendly and fast. Unfortunately I hope they can improve the performance of Pandas, which is still much slower compared to Q sql.

C++ still has its own use. If your analytic happens to require a lot of abstraction, composition, i.e extremely object oriented. C++ is still better. Not everything can vectorized. Not saying that Python can't do it. It can still do the trick but performance is not as good for this kind of purpose.

Well, pick the best tool for the specific problem you are tying to solve.

Daniel Duffy

C++ author, trainer
There are no stupid questions. I'm not sure how VS2015 calls pip but it should've found it if you did the usual pip install.

One more detail, I will use the Anaconda Python distribution. It's very stable and tailored for scientific computations.
I see it is for Python 3.7. Do I need to update from Python 3.6 under VS2017 or is it a separate implementation?
BTW pip is not needed; I just type xlwings etc. directly in the panel.

Also installed anaconda, keras, TensorFlow under VS2017 and no glitches to date!
Last edited:

Daniel Duffy

C++ author, trainer
One possible use (still have to examine) is to have something similar to the Excel Driver in the QN C++ course. I like using it because we can visualize output from numerical methods in a user-friendly way. The plotting libraries in Python are OK for quick visualization but Excel stores data in essentially database format.


Active Member
Also numba package can be very useful for speed equal to C++ code. Just use loops as you would in C++ over numpy arrays with @(nopython=True) superscript. I used it a lot in my comp fin course assignments. (scipy is not supported though)