Can't create Anaconda environment with python=3.4 - anaconda

I'm trying to set up a Anaconda environment with Python=3.4.
(base) C:\WINDOWS\system32>conda create -n py34 version=3.4
I already include the conda-forge channel, but still get this error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with 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:
- version=3.4
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
- https://conda.anaconda.org/conda-forge/win-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.
When i try it with:
(base) C:\WINDOWS\system32>conda create -n py34 python=3.4 -c conda-forge
I get:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package vc conflicts for:
python=3.4 -> vc=10
Package pip conflicts for:
python=3.4 -> pip
Package vs2010_runtime conflicts for:
python=3.4 -> vs2010_runtime
I'm pretty new to Anaconda and Python and dont know what to search for anymore.
This post: Why conda cannot create environment with python=3.4 installed in it didnt help either.

Firstly you can provide more details by increasing the verbosity of the create command, which will provide useful debug messages. Each -v increases the verbosity from INFO to DEBUG to TRACE. I normally always use DEBUG because I hate seeing it just sit there when solving an environment.
conda create -v -v -v -n py34 python=3.4
I don't believe you needed to add conda-forge, the problem with your first command was that you didn't specify python=3.4, you did version=3.4. Try it without conda-forge and including python=3.4 instead.
It also looks like your conda is broken, it's failing to resolve the environments which is likely not helping the situation. Try to fix that with
conda update --all
If you are still stuck with the same problem then review the conflicts with the following commands
conda info vc
conda info pip
conda info vs2010_runtime
I believe there is a chance that some of the packages in your base are incompatible with 3.4. In this case you could try to install without any default packages
conda create --no-default-packages -n py34 python=3.4
If you are still running into issues, there is a chance there is something janky with your config files, so I would try doing a complete uninstall of anaconda on windows. And then attempt this again.

Ok, 3 days later i found out that the latest Version of Anaconda is kinda broken. I downgraded to version 4.6.14 and now everythings seems to work.
conda config --set allow_conda_downgrades true
conda install conda=4.6.14
Solving environment: failed with current_repodata.json, will retry with next repodata source. UnsatisfiableError:

Related

How does one install opam with conda for Mac/apple/os-x?

I discovered that one can install much more than python stuff in conda. I am instlaling opam with conda for ubuntu with:
conda install -c conda-forge opam
and wanted to do it for my mac. Got some issues.
(iit_synthesis) brandomiranda~/iit-term-synthesis ❯ conda install -c conda-forge opam
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:
- opam
Current channels:
- 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.
does anyone know how to resolve them or install opam with a mac?
The Conda Forge feedstock for opam is only configured to build for linux-64 platform. Consider opening an Issue to request additional platform support for Conda.
Otherwise, there are binary distribution options for MacOS.

How can I install python-binance package in Pycahrm? (I am using the conda interpreter for my project)

I am trying to install the Python-binance package to Pycharm, but it is not available for the conda interpreter that I use.
When I try to install it via 'conda install python-binance' in my terminal I get the following error:
(base) patrickchong#Patricks-MacBook-Pro ~ % conda install python-binance
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-binance
Current channels:
- 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.
Which is strange, because it installs fine when I run 'pip install python-binance'.
Any help would be much appreciated!
Thanks to Flying Teller's comments below I managed to install python-binance using conda. However, in my Python interpreter, which uses conda, python-binance still doesn't appear? (when I click the + sign and look for python-binance it is not there?)
There is nothing unexpected happening here. pip and conda use different sources for their packages. pip always checks PyPi on which python-binance is available. conda looks for packages in a list of configured channels, in you case, the default channels. But if you check with the search function on anaconda.org, you can see that the package is only available from conda-forge, so you can install it from conda using
conda install -c conda-forge python-binance

Cannot install geopandas

I am trying to instal geopandas. It goes like this:
(base) PS C:\Users\a_e_f> conda install geopandas
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.
This can take several minutes. Press CTRL-C to abort.
Examining tornado:*
etc etc for more than an hour.
How I got here:
I installed anaconda many months ago but never got around to using it. Now I need to do something with geopandas so...
I tried to update anaconda. Got some warnings & so decided to uninstall it & do a new clean install.
I attempted to uninstall anacondas but found the instructions unclear & missed a step. Reinstalled anaconda. geopandas wouldn't install.
Research revealed the missing uninstall step. Did it again. Looked like it was all gone.
Installed anaconda. Verified as here: https://docs.anaconda.com/anaconda/install/verify-install/#
Tried to install geopandas. See above.
I am using Windows 10
Do not install packages into the base environment, create new, clean ones for your project.
Use conda-forge channel where GeoPandas team has the ability to fine tune installation process
conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install geopandas
if that doesn't help, use mamba to install GeoPandas.
conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install mamba
mamba install geopandas
Following merv's hints (above) I used the approach here: Conda install some-package hangs with (Solving environment: failed)
That seems to have fixed the problem.
Thanks all for your help.

Install specific PyTorch version (pytorch==1.0.1)

I'm trying to install specific PyTorch version under conda env:
Using pip:
pip3 install pytorch==1.0.1
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pytorch==1.0.1 (from versions: 0.1.2, 1.0.2)
ERROR: No matching distribution found for pytorch==1.0.1
Using Conda:
conda install pytorch==1.0.1
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==1.0.1
Current channels:
- 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.
I was able to find this version under https://anaconda.org/soumith/pytorch but is there a way to find it and install from console?
You can download/install the version you like from the official Pytorch's Conda package. the link you specified is an old version and is not supported/updated for quit some time now!.
Install your desired version like this :
conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
If you are looking for a pip version, you can view and access all versions from here as well.
and simply do :
pip install torch===1.0.1 -f https://download.pytorch.org/whl/torch_stable.html
You can always check the previous versions here as well.
You could download a previous version of pytorch by using any of these :
For Linux/Windows Specific OS
# CUDA 9.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch
Visit this website to see how to install pytorch versions on your specific operating software. I hope this answer was helpful.

conda update conda fails: nothing happens except a useless message

Any attempt to upgrade conda gives:
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.11
latest version: 4.7.12
Please update conda by running
$ conda update -n base -c defaults conda
without any other effect (and finally conda is never updated).
It turned out that one package (lmfit, I don't know why) is in conflict with 4.7.12 while no message/info is given. To get a piece of info, I asked explicitly to install 4.7.12:
conda install conda=4.7.12
then I get:
UnsatisfiableError: The following specifications were found to be in conflict:
- conda=4.7.12
- lmfit
Use "conda info <package>" to see the dependencies for each package.
when I try conda info lmfit, nothing happens...

Resources