Pip install on Mac OS gets error: command ‘/usr/bin/clang’ failed with exit code 1

Try to add these env var before If it does not work you can try with virtualenv: Because is written on github: Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions. With virtualenv, it’s … Read more

How to install Anaconda on RaspBerry Pi 3 Model B

Installing Miniconda on Raspberry Pi and adding Python 3.5 / 3.6 Skip the first section if you have already installed Miniconda successfully. Installation of Miniconda on Raspberry Pi Accept the license agreement with yes When asked, change the install location: /home/pi/miniconda3 Do you wish the installer to prepend the Miniconda3 install location to PATH in your /root/.bashrc … Read more

Iterating over dictionary items(), values(), keys() in Python 3

I’m not sure if this is quite an answer to your questions but hopefully it explains a bit about the difference between Python 2 and 3 in this regard. In Python 2, iter(d.keys()) and d.iterkeys() are not quite equivalent, although they will behave the same. In the first, keys() will return a copy of the dictionary’s list of keys and iter will then … Read more

How do you switch between python 2 and 3, and vice versa?

Using ‘virtualenv’ you can have different isolated Python environments on a single machine. Also you can switch any-time between the different python interpreter versions. What is virtualenv? A Virtual Environment is an isolated working copy of Python which allows you to work on a specific project without worry of affecting other projects. It enables multiple side-by-side installations … Read more

Error loading MySQLdb module: No module named ‘MySQLdb’

MySQLdb is only for Python 2.x. You can’t install in Python 3.x versions. Now from your question i can see that you are working with Django. In this case you have three alternatives, from Django mysql notes: mysqldb mysqlclient mysql-connect-python This gives to you two alternatives, mysqlclient and mysql-connect-python, The first one requires compilation from extensions … Read more