Author image

Install Python Packages script


Merely a handy run-and-forget script that installs all python packages specified in a text file “packages.txt”. I've used it countless times. Press a button and let the console ASCII text flow!

You will more than likely need to run the script (or Visual Studio if you're using that to run it) with administrator privileges, otherwise you'll be denied permission to install packages.

Requirements:

  • Python 3.x version installed (only tested with 3.5 and 3.6.6)
  • Latest pip version for the specified python version installed

I've used Windows 8.1 x86_64, Visual Studio 2017 IDE with Python tools and Python 3.6.6 interpreter.

Github

Github repository link.

Author image

Pybind 11 Tutorial


Pybind11 is a lightweight header only library that exposes c++ types in Python. 8k lines entire library. 5k LOC core codebase. You can use it to extend python with C/C++ written python extensions - similar to CPython but in a much easier and up-to-date method. Or you can embed the python interpreter in C++ allowing for python scripting in a C++ application. It goes both ways it's not particularly hard and you basically get to marry the Beauty and the Beast together (and C++ is not the beauty..).

Tip:

If you don't have a python distribution installed on your system you can extract the python36.zip and python36.dll from the pybinding\x64\Debug\python-3.6.6-embed-amd64.zip file and place them on the same directory as the output executable. They will work exactly the same.


pybind_module is a static library project configured...

1