Install pip for python 3.5

Check: /usr/local/lib/python3.5/dist-packages You’ll either have Pip there or easy_install(part of Pythons setup tools), which can be used to install Pip: Or you can try: Another option is attempting to install from a repository, the package name depends on your distribution: Edit: Try this correction for easy install: I’m assuming that’s the directory it’s installed to. Also, … Read more

OpenMP and Python

Due to GIL there is no point to use threads for CPU intensive tasks in CPython. You need either multiprocessing (example) or use C extensions that release GIL during computations e.g., some of numpy functions, example. You could easily write C extensions that use multiple threads in Cython, example.

Python Text Menu Infinite Loop

You’re missing a line in menu, or else missing an input elsewhere. You’re not actually accepting a choice from your user yet. If you want to keep your current structure, menu should look like: Or, a little cleaner (same effect): Otherwise, you can just call menu() and then separately accept the user’s selection: Note that I’ve changed your input() calls to int(raw_input()). This is a much safer way … Read more

How to pass a list by reference?

Lists are already passed by reference, in that all Python names are references, and list objects are mutable. Use slice assignment instead of normal assignment. However, this isn’t a good way to write a function. You should simply return the combined list.