OS X (Mavericks) has Python 2.7 stock installed. But I do all my own personal Python stuff with 3.3. I just flushed my 3.3.2 install and installed the new 3.3.3. So I need to install pyserial
again. I can do it the way I’ve done it before, which is:
- Python is a widely-used programming language used in many of the computer science classes here at St. What is PIL/Pillow? PIL (Python Imaging Library) adds many image processing features to Python.
- Use Python 3 as the macOS default Python's website has a macOS Python 3 installer we can download and use. If we use the package installation, a python3 fill will be available in /usr/local/bin/. Aliasing is a must since the Python binary stored in /usr/bin/ can't be changed.
- On Mac OS X Mojave python stands for python of version 2.7 and python3 for python of version 3. The same is pip and pip3. So, to upgrade pip for python 3 do this: $ sudo pip3 install -upgrade pip.
Get-pip.py is another way to install pip in MacOS. Get-pip.py is a Python script that will simply download and install the Pip package for Python. First, we will download the get-pip.py script with the curl command. We will provide the URL with the -o option where we will set the name of the downloaded get-pip.
- Download pyserial from pypi
- untar pyserial.tgz
- cd pyserial
python3 setup.py install
But I’d like to do like the cool kids do, and just do something like pip3 install pyserial
. But it’s not clear how I get to that point. And just that point. Not interested (unless I have to be) in virtualenv yet.
UPDATE: This is no longer necessary with Python3.4. It installs pip3 as part of the stock install.
I ended up posting this same question on the python mailing list, and got the following answer:
Which solved my question perfectly. After adding the following for my own:
So that I could run pip directly, I was able to:
or:
I had to go through this process myself and chose a different way that I think is better in the long run.
I installed homebrew
then:
The last step gives you some warnings and errors that you have to resolve. One of those will be to download and install the Mac OS X command-line tools.
then:
This gave me python3
and pip3
in my path.
Install Python3 on mac
Use pip3
to install modules
🙂
Plus:
when you install requests with python3, the command is:
not
To use Python EasyInstall (which is what I think you’re wanting to use), is super easy!
so then with pip to install Pyserial you would do:
Download Pip Python Machine Learning
Also, it’s worth to mention that Max OSX/macOS users can just use Homebrew to install pip3.
On MacOS 10.12
download pip: pip as get-pip.py
download python3: python3
- install python3
- open terminal:
python3 get-pip.py
pip3
is available
Install Pip For Python 3 Mac
brew install python3
create alias in your shell profile
- eg.
alias pip3='python3 -m pip'
in my.zshrc
- eg.
➜ ~ pip3 –version
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)
Tags: python