Since the deprecation of Python 3.4, conda has removed it from its package list. Is there a way, however, that I can install it?
I need it in order to use software written in this older version.
EDIT:
My question is different than the suggested duplicate one, because I am referring to deprecated and unsupported versions. I already know how to create a conda environment with a specific python version, but executing:
conda create --name py34env python=3.4
results in error (listed in the end), which is due to the lack of the package for Python 3.4 .
One can see the currently supported versions of Python by executing: conda search python and can confirm that Python 3.4 is not on the list.
This is the output of the error when trying to create a Python 3.4 conda enviroment:
$ conda create --name py34env python=3.4
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.4
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-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.
When Anaconda dropped it's free channel (technically, Conda 4.7+ just no longer looks there), this resulted in some older package versions that had never been ported to main no longer being accessible.
Option 1: Globally enable free channel searching
However, there is an option to restore access to the free channel, namely restore_free_channel.
# Not generally recommended
conda config --set restore_free_channel True
conda create -n py34 python=3.4
This isn't generally recommended (see blog post), but if you will be working in Python v3.4 frequently and will require other older compatible packages, it might be the best option.
Option 2: Temporarily include free channel
A more temporary solution is to include the free channel using the ad hoc --channel,-c argument. For example,
# slightly better
conda create -n py34 -c defaults -c free python=3.4
Note that I include defaults prior to free so that the latter will only be used if the package cannot be sourced from the former. This assumes the channel_priority setting is set to flexible (the default).
Option 3: Use Conda Forge
Alternatively, Conda Forge has Python v3.4.5, and that won't force you to change a global configuration option.
conda create -n py34 -c conda-forge python=3.4
Related
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.
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.
I am attempting to install PyGMO on Mac OS X 11.2.2 (with Anaconda which I reinstalled so the Anaconda Navigator is now upgraded to 2.0.1.)
After the installation starts, it collects package metadata and reports it found package conflicts. How can I solve the conflict so that I can run PyGMO?
Here is the start:
$ conda install -c conda-forge pygmo
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.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
After few hours, the Terminal returns a long report of conflicts and stops there. Here is a representative piece of output:
Package selectors2 conflicts for:
wurlitzer -> selectors2
spyder-kernels -> wurlitzer[version='>=1.0.3'] -> selectors2
Package mpmath conflicts for:
anaconda==2020.07=py38_0 -> sympy==1.6.1=py38_0 -> mpmath[version='>=0.19']
sympy -> mpmath[version='>=0.19']
anaconda==2020.07=py38_0 -> mpmath==1.1.0=py38_0
Package anyio conflicts for:
jupyterlab -> jupyter_server[version='>=1.4,<2'] -> anyio[version='>=2.0.2|>=2.0.2,<3']
jupyterlab_server -> jupyter_server[version='>=1.4,<2'] -> anyio[version='>=2.0.2|>=2.0.2,<3']
Package py-lief conflicts for:
conda-build -> py-lief
anaconda==2020.07=py38_0 -> py-lief==0.10.1=py38haf313ee_0
Note that strict channel priority may have removed packages required for satisfiability.
I followed the official installation guidelines and set the additional channel and its priority. I also checked this command but that is essentially the same thing. I also tried the installation commands from PyPI. And I tried this hint as well
There are two possible states:
Conda solver is correct. The previous package constraints you have in the environment are incompatible with installing pygmo. In that case, you either need to track down the conflicting constraints and try to manually loosen them (not recommended for Anaconda base), or you need to make a new environment:
conda create -n pygmo_env -c conda-forge pygmo
Include whatever other packages you need in there. E.g., ipykernel if you plan on using it as a Jupyter kernel.
Conda solver is bugging out. The solver is reporting trouble solving when it really shouldn't be. This happens, and especially happens when mixing channels (defaults and conda-forge). Many find Mamba, the drop-in replacement for Conda, to be more reliable (and definitely faster!).
conda install conda-forge::mamba
mamba install -c conda-forge pygmo
Unfortunately, it's hard to tell which state it's in. Many of us have been down the rabbit hole of trying to sort through the constraint reports and sometimes there really isn't a sensible conflict to be found. For practical purposes, I'd recommend trying out mamba. If it also fails, then at least you'll have good evidence that you're in state (1).
Additional Commentary
Despite upbeat documentation about installing from any channel in Anaconda Cloud, an Anaconda distribution is highly constrained - i.e., has too many packages - and only tests for co-installation of packages from the defaults channel. Additionally, Conda Forge and Anaconda have different build stacks, so there can be runtime package incompatibilities even when the solver allows co-installation.
Generally, I'd recommend making liberal use of environment creation. Aim to have separate environments for separate tasks/projects. If you plan on frequently using more than a vanilla Anaconda distribution, consider Miniforge or one of its variants. One can always create an Anaconda environment with conda create -n foo -c defaults anaconda.
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)
I need the sacred package for a new code base I downloaded. It requires sacred.
https://pypi.python.org/pypi/sacred
conda install sacred fails with
PackageNotFoundError: Package missing in current osx-64 channels:
- sacred
The instruction on the package site only explains how to install with pip. What do you do in this case?
That package is not available as a conda package at all. You can search for packages on anaconda.org: https://anaconda.org/search?q=sacred You can see the type of package in the 4th column. Other Python packages may be available as conda packages, for instance, NumPy: https://anaconda.org/search?q=numpy
As you can see, the conda package numpy is available from a number of different channels (the channel is the name before the slash). If you wanted to install a package from a different channel, you can add the option to the install/create command with the -c/--channel option, or you can add the channel to your configuration conda config --add channels channel-name.
If no conda package exists for a Python package, you can either install via pip (if available) or build your own conda package. This isn't usually too difficult to do for pure Python packages, especially if one can use skeleton to build a recipe from a package on PyPI.
It happens some issue to me before. If your system default Python environment is Conda, then you could download those files from https://pypi.python.org/pypi/sacred#downloads
and manually install by
pip install C:/Destop/some-file.whl