As title, I've installed miniforge3
with pyenv and try using it to create a virtual environment with tensorflow-macos
package, which can be found from the pypi website: search result. I have tried three different python versions 3.8.12
, 3.9.10
, 3.10.2
and have .condarc
as follow:
channels: [apple, conda-forge, pypi]
auto_activate_base: false
the error all the same:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-macos
Can anyone explain why the package tensorflow-macos
can be found on pypi but I still cannot install it by conda with pypi channel added?
CodePudding user response:
Tensorflow it difficult even under native Linux operating systems (Ubuntu YECH!). I would suggest you dual-boot into a Linux distro of your choice and setup Docker for a simple solution... unless you REALLY want to endure pain.
Here is the documentation from NVidia: https://github.com/NVIDIA/nvidia-docker
Docker makes this stuff a lot easier!
CodePudding user response:
Since tensorflow-macos
is platform specific it's no need to install it via conda
miniforge3
channel for compatibility, just follow the guide from Apple's tensorflow-metal PluggableDevice guide to further utilize your M1(or AMD) GPU.
Notice that you have to use python 3.8.x
to run the following command:
pip install tensorflow-macos tensorflow-metal