簡單紀錄下
python3 -m venv {env_name}
# check version
python --version
# install apple version
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apple/tensorflow_macos/master/scripts/download_and_install.sh)"
----
This script will download tensorflow_macos 0.1alpha2 and needed binary dependencies, then install them into a new
or existing Python 3.8 virtual enviornoment.
Continue [y/N]? y
Path to new or existing virtual environment [default: /Users/someone/tensorflow_macos_venv/]: {your_venv_path}
Confirm [y/N]? y
----
# activate
source {your_venv_path}/bin/activate
# verify
----
% python
Python 3.8.7 (default, Feb 3 2021, 01:27:01)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> print(tf.__version__)
2.4.0-rc0
>>> exit()
----
# install adn set ipykernel for jupyter-lab
pip install ipykernel
python -m ipykernel install --user --name={env_name}
Installed kernelspec {env_name} in /Users/someone/Library/Jupyter/kernels/{env_name}
jupyter-lab
Comments
comments powered by Disqus