Install a specific version of PyTorch on M1 chip arm64 - macos

I would like to install torch==1.0.0 and torchvision==0.2.1 on my Mac macOS-12.5.1-arm64-arm-64bit in a conda environment (python 3.9).
I referred to the PyTorch documentation: https://pytorch.org/get-started/previous-versions/#v100
using pip :
(first) user#Users-MacBook-Air first-order-model % pip install torch==1.0.0 torchvision==0.2.1
ERROR: Could not find a version that met the torch==1.0.0 requirement (from versions: 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1)
ERROR: No matching distribution found for torch==1.0.0
or conda :
(first) user#Users-MacBook-Air first-order-model % conda install pytorch==1.0.0 torchvision==0.2.1 -c pytorch
Collect the package metadata (current_repodata.json): done
Resolution environment: failed with initial resolution frozen. Retry with a flexible solution.
Collect package metadata (repodata.json): done
Resolution environment: initial frozen resolution failed. Retry with a flexible solution.
PackagesNotFoundError: The following packages are not available in the current channels:
- pytorch==1.0.0
Current channels:
- https://conda.anaconda.org/pytorch/osx-arm64
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/osx-arm64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-arm64
- https://repo.anaconda.com/pkgs/r/noarch
To search for other channels that may provide the conda package you are looking for, go to
you are looking for, go to
https://anaconda.org
and use the search bar at the top of the page.
Do you know if this is possible? I don't think I've seen these versions available for arm64 here https://anaconda.org/soumith/pytorch/files .

Related

Cannot install tensorflow-deps for Apple Silicon

I'm trying to set-up by Apple Silicon Mac to be able to train tf models using its GPU.
I tried following the official instructions but I am getting the following error:
>>> conda install -c apple tensorflow-deps
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-deps
Current channels:
- https://conda.anaconda.org/apple/osx-64
- https://conda.anaconda.org/apple/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Not sure if it should matter but I didn't install Miniforge because I already have Anaconda installed comprehensively. Surely, this can't be the reason? (I didn't want to install Miniforge not to mess up my env by having multiple Conda installations).
I did add the "apple" channel in the Navigator manually and the package does seem to be there:
https://anaconda.org/apple/tensorflow-deps
What am I missing here?
I also struggled with this for a while. The only way I was able to get a successful environment set up was indeed installing conda through mini forge. Based on this link I believe this is because of the other packages Anaconda pre-installs that are not ARM compatible.
I followed this thread to remove my Anaconda installation. Once that is done the instructions you linked should be successful.

How to install ROOT (cern) using Anaconda on Windows 10? [duplicate]

I am attempting to install CERNS ROOT in anaconda, for use of pyRoot. (I am using conda 4.10.3)
I have set up a new environment with python 2.7, because I believe I read somewhere that ROOT does not work well with python 3. After installing python to the new environment and activating it, I have added conda-forge to the current channels and attempted to install the following:
https://anaconda.org/conda-forge/root-dependencies
Using:
conda install -c conda-forge root-dependencies
This however returned the following:
(pyRoot) C:\Users\George>conda install -c conda-forge root-dependencies
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:
- root-dependencies
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/win-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I am not sure why this is not working, as I am fairly sure the root-dependencies are available on the conda-forge channel as per the link.
I have tried the following:
SET CONDA_RESTORE_FREE_CHANNEL=1
Just in case it was part of the free channel that may have been dropped, but I still get the same error.
Any ideas are appreciated :)
The package is not built for win-64 platform, which is what OP channel configuration indicates is being used. Consider WSL2 or Docker (ROOT Project provides pre-built images).
If you would like Conda Forge to build a Windows version, submit an Issue on the feedstock. Just be aware that ROOT Project itself only has beta support for Windows natively, so it's likely not a trivial task.

pip install dgl failed even with pip search and whl

I tried to install dgl(https://github.com/dmlc/dgl)
There were several ways to install it.(https://docs.dgl.ai/install/index.html#install-from-source)
pip
conda
from git source
from whl
and I failed with error message when I tried pip
$ pip install dgl-cu101
ERROR: Could not find a version that satisfies the requirement dgl-cu101 (from versions: none)
ERROR: No matching distribution found for dgl-cu101
even pip search spot the package
$ pip search dgl
dgl (0.4.1) - Deep Graph Library
dgl-bots.py (1.1.0) - A python wrapper for https://bots.discord.gl
dgl-cu100 (0.4.1) - Deep Graph Library
dgl-cu92 (0.4.1) - Deep Graph Library
dgl-cu90 (0.4.1) - Deep Graph Library
dgl-cu101 (0.4.1) - Deep Graph Library
dgl-cu102 (0.5a200108) - Deep Graph Library
conda also does not work
$ conda install -c dglteam dgl-cuda10.1
Solving environment: failed
PackagesNotFoundError:
The following packages are not available from current channels:
- dgl-cuda10.1
Current channels:
- https://conda.anaconda.org/dglteam/linux-ppc64le
- https://conda.anaconda.org/dglteam/noarch
- https://repo.anaconda.com/pkgs/main/linux-ppc64le
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-ppc64le
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/linux-ppc64le
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/linux-ppc64le
- https://repo.anaconda.com/pkgs/pro/noarch
- https://conda.anaconda.org/conda-forge/linux-ppc64le
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
install with source code is not available option because I am the remote client to the server and has no root access
install with whl seems nice but also occurred error.(https://pypi.org/project/dgl/#files)
$ pip install dgl_cu101-0.4.1-cp37-cp37m-manylinux1_x86_64.whl
ERROR: dgl_cu101-0.4.1-cp37-cp37m-manylinux1_x86_64.whl is not a supported wheel on this platform.
I read almost every articles and most of them said it would be the environment problem,
but as far as I know, they match!
My env server
CentOS 7
python 3.7
64 bit
minsky
4 GPUs
designed for ML
My env client
macos
iterm2
no root access
access from different city
How can I solve this problem?
Please help.
Your conda channel
https://conda.anaconda.org/dglteam/linux-ppc64le
gives the clue. Your system seems to be based on a ppc64le CPU, not the most frequently seen x86_64.
As you can see On the conda page, only linux-64 (i.e. x86_64) is available. Same goes for the pypi project.
So your setup does not match.
install with source code is not available option because I am the remote client to the server and has no root access
You should not need root access to compile the source code. The requirements listed in the guide are
gcc-c++ python3-devel make cmake
which, if not available yet could be installed using conda:
conda install -c conda-forge make cmake libgcc

Cannot install bcftools-gtc2vcf-plugin using conda

I have installed bioconda following the instructions at https://bioconda.github.io/user/install.html#set-up-channels. Then I tried
conda install bwa
conda install bcftools
conda install plink2
They all installed fine. However, when I tried
conda install bcftools-gtc2vcf-plugin
or
conda install -c bioconda bcftools-gtc2vcf-plugin
as instructed at https://bioconda.github.io/recipes/bcftools-gtc2vcf-plugin/README.html, I got errors as follows:
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:
- bcftools-gtc2vcf-plugin
Current channels:
- https://conda.anaconda.org/bioconda/osx-64
- https://conda.anaconda.org/bioconda/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Any help would be highly appreciated.
Thanks in advance!
I would advise (as of 2020-01-06) not to use the bcftools-gtc2vcf-plugin as it is an old version missing many features compared to the current version. I would advise either to compile from source (https://github.com/freeseek/gtc2vcf) or alternatively to download pre-compiled binaries (https://personal.broadinstitute.org/giulio/gtc2vcf) that should work on systems with ≥GLIBC_2.3 installed (and making sure you are running the latest version of BCFtools)
If you get the error:
No functional bcftools plugins were found in
BCFTOOLS_PLUGINS="/Users/moxu/xbin/seq/bcftools/plugins".
- Is the plugin path correct?
- Run "bcftools plugin -lv" for more detailed error output.
Could not load "gtc2vcf".
(a bcftools plugin bug that the maintainers will fix soon), can you try to run one of the following commands instead:
$ bcftools plugin gtc2vcf -vv
$ bcftools +gtc2vcf -vv
$ bcftools plugin /Users/moxu/xbin/seq/bcftools/plugins/gtc2vcf.so -vv
$ bcftools +/Users/moxu/xbin/seq/bcftools/plugins/gtc2vcf.so -vv
You should get a reason for why the plugin is not loading. A typical error message could look like this:
/Users/moxu/xbin/seq/bcftools/plugins/gtc2vcf.so:
dlopen .. /lib64/libc.so.6: version `GLIBC_2.3' not found (required by /Users/moxu/xbin/seq/bcftools/plugins/gtc2vcf.so)

conda: why I can not install pkgs in one environment, while I can install in another?

I'm using two environment of conda. I can not intall packages in one env, while I can intall packages in the other environment.
The error massage is: 'solving environment: failed'
system: windows 10 x64
The error msg:
(py3env) C:\>conda install cython
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- anaconda/pkgs/free/win-64::protobuf==3.2.0=py36_0 -> libprotobuf==3.2.0
- anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> backports.weakref==1.0rc1
- anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> bleach==1.5.0
- anaconda/pkgs/free/win-64::tensorflow==1.2.1=py36_0 -> html5lib==0.9999999
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
While the success info in another environment:
(py2env) C:\>conda install cython Collecting package metadata (current_repodata.json): done Solving environment: done
## Package Plan ##
environment location: C:\Users\sonic\Anaconda3\envs\py2env
added / updated specs:
- cython
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2019.6.16 | py27_0 151 KB
cython-0.29.11 | py27hc56fc5f_0 2.0 MB
------------------------------------------------------------
Total: 2.1 MB
The following NEW packages will be INSTALLED:
cython pkgs/main/win-64::cython-0.29.11-py27hc56fc5f_0
The following packages will be UPDATED:
certifi anaconda/pkgs/free::certifi-2016.2.28~ --> pkgs/main::certifi-2019.6.16-py27_0
Proceed ([y]/n)?
I think it is because you have packages installed from the "free" channel, but that channel has been removed. So conda is confused about what to do. You should read the blog post anaconda.com/why-we-removed-the-free-channel-in-conda-4-7 and temporarily add the "free" channel back to your configuration as described in that blog by running the command conda config --set restore_free_channel true. After you run that command, you can set the restore free channel back to false if you finished installing the Cython. Thanks for the comments of #darthbith

Resources