Miniforge Conda "PackagesNotFoundError" on ARM processor for PyTorch - pytorch

I am unable to install any packages with miniforge 3 (conda 4.11.0).
I am attempting this on a Jetson Nano Developer Kit running Jetpack. Initially it had conda installed but it seems to have gone missing, so I decided to reinstall conda. It looks like the base version of anaconda/miniconda is having issues running on ARM processors, and so I downloaded miniforge which apparently is working.
I have set up an environment successfully, but attempting to download pytorch gives the following error:
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:
- pytorch
Current channels:
- https://conda.anaconda.org/pytorch/linux-aarch64
- https://conda.anaconda.org/pytorch/noarch
- https://conda.anaconda.org/abinit/linux-aarch64
- https://conda.anaconda.org/abinit/noarch
- https://conda.anaconda.org/matsci/linux-aarch64
- https://conda.anaconda.org/matsci/noarch
- https://conda.anaconda.org/conda-forge/linux-aarch64
- 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.
This is for Python 3.7.12. It seems this issue persists no matter what version of pytorch I try to install.
I am however able to install some other packages, as I was able to install beautifulsoup4.

There is no linux-aarch64 version of pytorch on the default conda channel, see here
This is of course package specific. E.g. there is a linux-aarch64 version of beautifulsoup4 which is why you wre able to install it without an issue.
You can try to install from a different channel that claims to provide a pytorch for aarch64, e.g.
conda install -c kumatea pytorch

Related

Unable to install tensorflow-gpu on anaconda with PackagesNotFoundError

I have created new environment in anaconda, webapp-env, to use streamlit and flask.
I have installed cuda (8.1) and cudatoolkit (11.2) so it is compatible with my environment and am trying to install tensorflow-gpu=2.8.0 (or 2.9.0) as per the table here:
https://www.tensorflow.org/install/source_windows
Unfortunately, I am getting this error (below) and I dont know how to solve this.
(webapp-env) PS C:\Users\me\Coursera_NN_visualizer_web_app_MNIST_project> conda config --append channels conda-forge tensorflow-gpu = 2.9.0
usage: conda-script.py [-h] [-V] command ...
conda-script.py: error: unrecognized arguments: tensorflow-gpu = 2.9.0
(webapp-env) PS C:\Users\me\Coursera_NN_visualizer_web_app_MNIST_project> conda install -c conda-forge tensorflow-gpu=2.8.0
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-gpu=2.8.0
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/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 have an Nvidia 3060 graphics card and can use tensorflow-gpu version 2.8.0 successfully in my anaconda base virtual environment.
any advice?
Tnesorflow-GPU in the mainchannel is at version 2.6 and from conda-forge, only a linux version is available, see here and here
You probably used pip to install it in your base env. You can do so in your new env just as well

Issue while installing a lower python version in conda prompt

I have python version 3.8.8 in conda. I want version 3.5.0 for a Machine learning project but when I ran the command conda install python=3.5.0, following output came:
**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:
python=3.5.0
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.**
I am not able to comprehend this. How can I install the required python version?
Good thing with conda is you can maintain as many versions of python as you want simultaneously but you're trying to modify the main distribution of python that comes with the conda that you've installed. What you should do is create a new environment with the desirable python version.
Create a new environment for your ML-related work using
conda create -n ml_env python=3.5.0
conda activate ml_env
This way, if you no longer need the stuff you installed for ML, you can easily remove the whole environment:
conda env remove -n ml_env

Remove nodejs with Conda in JupyterLab [duplicate]

I'm trying to use python packages in R, but I keep getting the same error:
ImportError: cannot import name 'read_csv' from 'pandas' (unknown location)
I cant use "py_install" neither:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.1
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/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.
Error: one or more Python packages failed to install [error code 1]
I have tried to specify my folder in which the packages are in, but it doesn't work.
Hope you guys can help.
My code:
library(reticulate)
use_condaenv("C:/Users/Bruger/AppData/Local/r-miniconda/envs/r-reticulate")
import("pandas")
py = py_run_string
py("import pandas as pd")
py("from pandas import read_csv")
Conda 4.10 is incompatible with python 3.10.
The issue is not related to R, and maybe there is nothing wrong with your code. The same type of problem occurred at the following SO issues:
PyTorch installation asks for python=3.1 . Python Version installed: 3.10.0
Trying to install Earth Engine on R; python=3.1 not available
Why can't I install matplotlib or pandas with pip OR miniconda?
Solutions
If you need python 3.10+
If you need python 3.10 or newer, you must have conda 4.11 or newer. Install the desired conda version, or switch to the base environment and update conda using conda update conda. Something like:
conda activate base
conda update conda
conda create --name r-reticulate python=3.10 pandas numpy scipy matplotlib scikit-learn
conda activate r-reticulate
You may need to add non-default channels to your conda, as I get an UnsatisfiableError using it. By using the conda-forge channel e.g., I got no error (but this may install newer than usual packages):
conda create --name r-reticulate -c conda-forge python=3.10 pandas numpy scipy matplotlib scikit-learn
If you want to keep the old conda
Install another environment from base with python 3.9 or older like
conda activate base
conda create --name r-reticulate python=3.9 pandas numpy scipy matplotlib sklearn
conda activate r-reticulate
Other symptoms
You basically cannot install anything after creating and activating your python 3.10 environment. You cannot even install conda-build:
conda install conda-build -y
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
ResolvePackageNotFound:
- python=3.1
Conda 4.10 contains python 3.9 and conda 4.11 contains python 3.10, so your base environment should be compatible with the python version therein.
duplicate?
If you believe that your question is a duplicate, please check how you can improve it.
This answer is in agreement with meta. I believe this is an example where exactly the same answer should be accepted, but I also customized the answer to the question.
This works for me
library(reticulate)
x = import('pandas')
x$read_excel()
You can install the package in this way
py_install("pandas")

'UnsatisfiableError' while trying to install scikit-learn

I need sklearn that's why I tried installing scikit-learn in my conda env using conda install scikit-learn but it results in:
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- scikit-learn -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/linux-64::__cuda==9.1=0
- feature:|#/linux-64::__cuda==9.1=0
Your installed version is: 9.1
The same appears if I try conda install -c anaconda scikit-learn or conda install -c conda-forge scikit-learn. How to resolve this?
Ok, so the problem was that my env was running Python 3.9.0 but scikit-learn isn't compatible with 3.9 so I created a new env while specifically mentioning the Python version by
conda create -n newEnv python=3.7.3
python 3.7.3 was running in my base environment so I chose that.
I have just encountered this problem, and my OS is Windows10. At first I tried to uninstall scikit-learn package and reinstall it, but it failed. Then I searched this website which focuses on python package using wheel. Luckily scikit-learn compatible with python3.9.0 now is available. After downloading the proper wheel file, I cd into the download folder and use 'pip install <wheel file name>' to install it. It worked for my situation. Wishes for you.

Conda keeps trying to install all optional dependencies?

When installing Theano anaconda automatically tries to install pygpu despite this being an optional dependency. I have deleted the .theanorc file from my windows user directory.
Also when running my application Theano tries to load from the GPU. It's like it remembers somehow?
conda install theano
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment
C:\Users\zebco\Miniconda3\envs\py35:
The following NEW packages will be INSTALLED:
libgpuarray: 0.6.9-vc14_0
pygpu: 0.6.9-py36_0
theano: 0.9.0-py36_0
Proceed ([y]/n)?
As you can see I've only specified to install theano yet conda wants to install everything including optional dependancies.
Your assumption that pygpu is optional is dependent on the package manager you are using.
Regular Python (pip)
If you are using a direct Python install (obtained using brew or Python site) then you would be using pip to install theano. This basically comes from
https://pypi.python.org/pypi/Theano/1.0.0
If you download the file and unzip it. Open setup.py, you will see below lines
install_requires=['numpy>=1.9.1', 'scipy>=0.14', 'six>=1.9.0'],
So they are set as the dependencies for this package. Which means when you install theano you will also get numpy, scipy and six.
Anaconda Python (conda)
Now coming to Anaconda python. Anaconda doesn't use a package format that PyPI or pip uses. It uses its own format. In case of Anaconda you should be using conda to install the packages you need and not pip.
Conda has channels which is nothing but a repository which has some packages available. You can install a package from any channel using below
conda install -c <channel-name> <package-name>
The default channel is conda-forge. If you look at the theano package over there
https://anaconda.org/conda-forge/theano/files
And download and extract it. There will be a info/recipe/meta.yml file. You will notice below content in the same
requirements:
build:
- ca-certificates 2017.7.27.1 0
- certifi 2017.7.27.1 py36_0
- ncurses 5.9 10
- openssl 1.0.2l 0
- python 3.6.2 0
- readline 6.2 0
- setuptools 36.3.0 py36_0
- sqlite 3.13.0 1
- tk 8.5.19 2
- xz 5.2.3 0
- zlib 1.2.11 0
run:
- python
- setuptools
- six >=1.9.0
- numpy >=1.9.1
- scipy >=0.14
- pygpu >=0.6.5,<0.7
Which specifies that if you want to run this package then pygpu is also on of its dependencies. So conda downloads pygpu as a dependency which you though was optional (which is probably true if you were using regular python and pip)
Update:
Usually, 'Optional Dependency' is an oxymoron. Something optional is not a dependency, a dependency is a software package another piece of software depends on to function for features.
One may get by without a dependency if the dependency does not interact with the package except for one atomized feature which is not being used. As a beginner I would suggest you not take this path.
I am not super familiar with Theano, but Theano can use the system's GPU to speed up its computations, and it seems to me pygpu and gpulibarray are what enable this functionality. Which means it is not optional.
I believe pygpu is 'optional' if you do not wish to use the GPU for speeding up computation (only done if the GPU is powerful enough to be useful for this).
The --no-deps command above allows you to install a package without its dependencies but that is rarely wise, unless one really knows what they are doing. As a beginner I would not recommend you go down this path yet. Conda was designed specifically to ensure scientific packages are easily managed with all necessary stuff installed without any fuss or muss. pip is a general python package manager, but is not built specifically for scientific packages.
If you wish to install theano without installing its dependencies, then you have one of three options:
use conda install theano --no-deps.
Install it using pip instead of conda, using pip install theano. This will install theano, numpy, scipy and six but not pygpu and libgpuarray.
Create a custom conda build file for Theano. Documentation is at:
https://conda.io/docs/user-guide/tasks/build-packages/index.html
Original Answer:
You probably know this already but, use this command instead:
conda install theano --no-deps
This does not install dependencies of the package. If you already have the essential dependencies installed, as it would seem, this should work out for you.
libgpuarray is a dependency of pygpu. With this command switch neither will be installed.
Can you share the .yaml file that you edited?

Resources