-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathInstallPythonEnvironment.txt
More file actions
52 lines (35 loc) · 2.1 KB
/
InstallPythonEnvironment.txt
File metadata and controls
52 lines (35 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
**FOR AN M1/M2 Mac!!! you might need to install a "Rosetta Terminal" that uses the Intel instruction set for installing Turi:**
1. List of steps for setup with python 3.8 (for compatibility with Turi) (used Rosetta terminal, see here: “Download a free "Terminal" like "iTerm". In the Applications folder, Right click on it and select "Get Info". Click the checkbox which says "Open using Rosetta". Launch your Rosetta Terminal and install TuriCreate like you normally would.”
This is also discussed here: Install using a terminal that is running x86 (i386) using rosetta:
https://developer.apple.com/forums/thread/718722
2. Instead of running the first command below, you might need to run the following from the Rosetta terminals follows:
CONDA_SUBDIR=osx-64 conda create -n "python38env" python=3.8
If you are not sure which instruction set the terminal is using, try the "arch" command. If you get back arm64, this is M1/M2 instruction set (will not work for Turi). If you get back "i386" or "x86_64" this is using the instruction set needed for Turi.
Note that numpy must be an older version to be compatible with Turi ...
You should always install new packages using the terminal that is i386/x_86. Otherwise, you can contaminate the entire environment
**Instructions for Intel Macs:**
conda create -n "python38env" python=3.8
conda create -n "python38env" python=3.8
**Instructions for M1/M2 Install:**
CONDA_SUBDIR=osx-64 conda create -n "python38env" python=3.8
** Instructions for all Macs:**
python3 -m pip install --upgrade pip
pip3 install numpy==1.23.1
pip3 install pandas
pip3 install matplotlib
pip3 install scikit-learn
pip3 install seaborn
pip3 install jupyter
pip3 install coremltools
pip3 install turicreate
pip3 install motor
pip3 install fastapi
If you would rather NOT use Turi and instead use scikit learn, these are the commands (no need to install or use rosetta):
conda create -n "python38env" python=3.8
conda activate python38env
python3 -m pip install --upgrade pip
pip3 install numpy
pip3 install scikit-learn==1.1.2
pip3 install coremltools
pip3 install motor
pip3 install fastapi