Skip to content

Commit

Permalink
some other 3.6 documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
findtopher committed Sep 19, 2024
1 parent 0da1057 commit 0020745
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ FROM $BASE_IMAGE
# Install ETA
#
# Notes:
# ETA supports Python 2.7.X or Python 3.6.X
#
# `ppa:deadsnakes/ppa` is used in order to install Python 3.6 on Ubuntu 16.04
# https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
#
# `https://bootstrap.pypa.io/get-pip.py` is used to install pip on Python 3.6
# https://askubuntu.com/questions/889535/how-to-install-pip-for-python-3-6-on-ubuntu-16-10
# ETA supports Python 3.9+
#
# numpy==1.16.0 is enforced as a last step because tensorflow requires this
# version to function properly, and some commands here seem to mess with the
Expand All @@ -58,8 +52,8 @@ RUN apt-get update \
git \
curl \
wget \
python3.6 \
python3.6-dev \
python3.9 \
python3.9-dev \
libcupti-dev \
ffmpeg \
imagemagick \
Expand Down
20 changes: 5 additions & 15 deletions docs/virtualenv_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,14 @@ environment is highly recommended because it allows you to maintain a separate
Python working environment for ETA that operates independently of other
packages and Python applications on your machine.

> Note that ETA does not currently support Python 3.7, so you must instead
> have a Python 3.6 distribution installed on your machine
> Note also that it is highly recommended that you do NOT use an Anaconda
> Python distribution; if you do, the steps described here may fail... Fear
> not, however, as ETA will install all necessary pacakges for you!

## Creating a virtual environment

* If you want to create a Python 2.7 virtual environment and need a fresh
Python installtion, download and install it from
https://www.python.org/downloads

* If you want to create a Python 3.6 virtual environment and need a fresh
* If you want to create a Python 3.9 virtual environment and need a fresh
Python installation, follow the steps below:

```shell
Expand All @@ -29,8 +22,8 @@ sudo apt-get update
sudo apt-get -y --no-install-recommends install software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get -y --no-install-recommends install python3.6 python3.6-dev
sudo ln -s /usr/bin/python3.6 /usr/local/bin/python
sudo apt-get -y --no-install-recommends install python3.9 python3.9-dev
sudo ln -s /usr/bin/python3.9 /usr/local/bin/python
curl https://bootstrap.pypa.io/get-pip.py | sudo python
sudo pip install --upgrade pip setuptools
sudo pip install virtualenv
Expand Down Expand Up @@ -61,10 +54,7 @@ cd "${ENV_DIR}"
* Make a virtual environment, modifying the python executable path as needed:

```shell
# Example for Python 2.7
virtualenv -p /usr/local/bin/python eta2

# Example for Python 3.6
# Example for Python 3.9
virtualenv -p /usr/local/bin/python3 eta3
```

Expand All @@ -90,7 +80,7 @@ exit() {
To install ETA in a virtual environment, simply activate the environment:

```shell
# Example of activating a Python 3.6 environment created above
# Example of activating a Python 3.9 environment created above
eta3
```

Expand Down
4 changes: 2 additions & 2 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ fi
# Check Python version
MSG "Checking version of 'python' binary"
PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')
if [[ $PYTHON_VERSION == "3.6."* ]] || [[ $PYTHON_VERSION == "2.7."* ]]; then
if [[ $PYTHON_VERSION == "3.9."* ]]; then
MSG "Found compatible version: Python ${PYTHON_VERSION}"
else
WARN "Python 3.6.X or 2.7.X are recommended, but Python $PYTHON_VERSION was found"
WARN "Python 3.9.X is recommended, but Python $PYTHON_VERSION was found"
read -p "Are you sure you want to continue? [y/N] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
Expand Down

0 comments on commit 0020745

Please sign in to comment.