Following this guide Testing Deployment Using a Staging Site, I have installed python 3.6 on Ubuntu 16.04 using: sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update sudo apt-get install python3.6 Unfortunately I now want to use the anaconda package manager, and so to avoid a conflict I'd like to remove all traces of my upgrade. Mac 卸载干净python3.7. Mac 默认安装了python2;自己后面又安装了python3;为了方便,现在想将python3换成Anaconda3. 'The basic premise of all Python development is to never use the system Python. You do not want the Mac OS X 'default Python' to be 'python3.' You want to never care about default Python.' How do we stop caring about the default? Moshe recommends using pyenv to manage Python environments (for a deeper dive on configuring pyenv, see this article.
If you already have Python 3.8 or later installed, you can easily give Home Assistant a spin.
It's recommended when installing Python packages that you use a virtual environment. This will make sure that your Python installation and Home Assistant installation won't impact one another. The following steps will work on most UNIX like systems.
This is a generic guide for running Home Assistant under Python. We recommend to use our recommended installation guides. The steps below may be shorter but some users find difficulty when applying updates and may run into issues.
Before you begin the guide below, ensure that you have a so-called standard build environment that includes things like make
, gcc
, python3
, including Python 3 setuptools
and pip
modules. Less obvious is the need to install libssl-dev
(for opensslv.h), libffi-dev
(for cffi.h) for things to build later on, libjpeg-dev
, zlib1g-dev
, libopenjp2-7
and libtiff5
needed for the frontend.
Install
- Create a virtual environment in your current directory:
- Open the virtual environment:
- Activate the virtual environment:
- Install Home Assistant:
- Run Home Assistant:
- You can now reach the web interface on
http://ipaddress:8123/
- the first start may take a couple of minutes before the web interface is available. This can take longer if you're using lower-end hardware like a Raspberry Pi Zero.
Upgrade
Stop Home Assistant
Open the directory where the virtual environment is located, activate the virtual environment, then upgrade Home Assistant:
Start Home Assistant
You can now reach the web interface on
http://ipaddress:8123/
- the first start may take some time before the web interface is available, depending on how many integrations need to be upgraded.
Run a specific version
In the event that a Home Assistant version doesn't play well with your hardware setup, you can downgrade to a previous release. For example:
Run the beta version
If you would like to test next release before anyone else, you can install the beta version, for example:
Run the development version
If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to dev
.
For example:
Notes
- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5.
- It's recommended to run Home Assistant as a dedicated user.
Looking for more advanced guides? Check our Raspberry Pi OS guide or the other installation guides.
After upgrading Python
If you've upgraded Python (for example, you were running 3.8.1 and now you've installed 3.8.6) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory:
Then follow the Install steps again, being sure to use the newly installed version of Python.
Learn how to upgrade Python 3.6 to Python 3.7 or 3.8 on Mac OS.
Python Official Site
1) Open up Python official download site. It looks something like the image below. Press Download Python 3.7.4
(release date was July 8, 2019) or Download Python 3.8.0
(release date was Oct. 14, 2019) or the version you would like to download.
2) Use the download installer to install Python 3.7. You can refer to How to Install Python3 article for more information.
Homebrew
Uninstall Python 3.7 Mac
If you use Homebrew, you can run brew install
command to update Python to Python 3.7
Verification
After you install, python3 command will point to Python 3.7
. You can verify by using commands below.
You can use which
command to find out the location of Python 3.7
Note
You can check out How to Install Pip article to learn how to install Pip.
Support Jun
Thank you for reading!
If you are preparing for Software Engineer interviews, I suggest Elements of Programming Interviews in Java for algorithm practice. Good luck!
You can also support me by following me on Medium or Twitter.
Run the development version
If you want to stay on the bleeding-edge Home Assistant development branch, you can upgrade to dev
.
For example:
Notes
- In the future, if you want to start Home Assistant manually again, follow step 2, 3 and 5.
- It's recommended to run Home Assistant as a dedicated user.
Looking for more advanced guides? Check our Raspberry Pi OS guide or the other installation guides.
After upgrading Python
If you've upgraded Python (for example, you were running 3.8.1 and now you've installed 3.8.6) then you'll need to build a new virtual environment. Simply rename your existing virtual environment directory:
Then follow the Install steps again, being sure to use the newly installed version of Python.
Learn how to upgrade Python 3.6 to Python 3.7 or 3.8 on Mac OS.
Python Official Site
1) Open up Python official download site. It looks something like the image below. Press Download Python 3.7.4
(release date was July 8, 2019) or Download Python 3.8.0
(release date was Oct. 14, 2019) or the version you would like to download.
2) Use the download installer to install Python 3.7. You can refer to How to Install Python3 article for more information.
Homebrew
Uninstall Python 3.7 Mac
If you use Homebrew, you can run brew install
command to update Python to Python 3.7
Verification
After you install, python3 command will point to Python 3.7
. You can verify by using commands below.
You can use which
command to find out the location of Python 3.7
Note
You can check out How to Install Pip article to learn how to install Pip.
Support Jun
Thank you for reading!
If you are preparing for Software Engineer interviews, I suggest Elements of Programming Interviews in Java for algorithm practice. Good luck!
You can also support me by following me on Medium or Twitter.
Uninstall Python Mac Os
Feel free to contact me if you have any questions.