Conda cannot install pydot-ng with python3 (Unsatisfiable error) - python

I have Anaconda 4.3.23 on Ubuntu 16.04 LTS. When I try to install pydot-ng package using
conda install pydot-ng
I get the following error:
UnsatisfiableError: The following specifications were found to be in conflict:
- pydot-ng -> python 2.7* -> openssl 1.0.1*
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.
Upon running conda info pydot-ng i see
pydot-ng 1.0.0.15 py27_0
------------------------
file name : pydot-ng-1.0.0.15-py27_0.tar.bz2
name : pydot-ng
version : 1.0.0.15
build string: py27_0
build number: 0
channel : defaults
size : 45 KB
arch : x86_64
date : 2015-09-09
license : MIT
md5 : 8b81a344723e64ec3545b5f030caca47
noarch : None
platform : linux
url : https://repo.continuum.io/pkgs/free/linux-64/pydot-ng-
1.0.0.15-py27_0.tar.bz2
dependencies:
pyparsing
python 2.7*
pydot-ng 1.0.0.15 py34_0
------------------------
file name : pydot-ng-1.0.0.15-py34_0.tar.bz2
name : pydot-ng
version : 1.0.0.15
build string: py34_0
build number: 0
channel : defaults
size : 46 KB
arch : x86_64
date : 2015-09-09
license : MIT
md5 : 13e3a10b45edfb38d91a51d6b3ccabc7
noarch : None
platform : linux
url : https://repo.continuum.io/pkgs/free/linux-64/pydot-ng-
1.0.0.15-py34_0.tar.bz2
dependencies:
pyparsing
python 3.4*
What is the problem? Shouldn't conda be able to install the pydot-ng 1.0.0.15 py34_0 version which would be compatible with python 3.6 (I presume)?

That's not how conda works - the package is built for a specific version of Python, unless the package builder specifically says that its a universal package and can be installed for many versions. The simplest solution to this is to create a new environment to install this package:
conda create -n pydotng python=3.4 pydot-ng

Related

conda install and conda build result in different dependency versions

I'm trying to build a package which includes h5py. When using conda build, it seems to install the wrong version of the dependency. It installs 3.2.1-py37h6c542dc_0, which includes hdf5: 1.10.6-nompi_h6a2412b_1114.
The problem is that this hdf5 lib, seems to have these setting:
(Read-Only) S3 VFD: yes
This causes an error for me. When just running conda install h5py==3.2.1, it does install the right version (hdf5-1.10.6-nompi_h3c11f04_101).
Why is there a difference?
"Why is there a difference?
Using conda install h5py=3.2.1 additionally includes all the previous constraints in the current environment, whereas during a conda build run, a new environment is created only with requirements that the package specifies. That is, it is more like running conda create -n foo h5py=3.2.1.
So, that covers the mechanism, but we can also look at the particular package dependencies to see why the current environment constrains to the older hdf5-1.10.6-nompi_h3c11f04_101, which OP states is preferred. Here is the package info for the two:
hdf5-1.10.6-nompi_h6a2412b_1114
$ mamba search --info conda-forge/linux-64::hdf5[version='1.10.6',build='nompi_h6a2412b_1114']
hdf5 1.10.6 nompi_h6a2412b_1114
-------------------------------
file name : hdf5-1.10.6-nompi_h6a2412b_1114.tar.bz2
name : hdf5
version : 1.10.6
build : nompi_h6a2412b_1114
build number: 1114
size : 3.1 MB
license : LicenseRef-HDF5
subdir : linux-64
url : https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.10.6-nompi_h6a2412b_1114.tar.bz2
md5 : 0a2984b78f51148d7ff6219abe73509e
timestamp : 2021-01-08 23:10:11 UTC
dependencies:
- libcurl >=7.71.1,<8.0a0
- libgcc-ng >=9.3.0
- libgfortran-ng
- libgfortran5 >=9.3.0
- libstdcxx-ng >=9.3.0
- openssl >=1.1.1i,<1.1.2a
- zlib >=1.2.11,<1.3.0a0
hdf5-1.10.6-nompi_h3c11f04_101
$ mamba search --info conda-forge/linux-64::hdf5[version='1.10.6',build='nompi_h3c11f04_101']
hdf5 1.10.6 nompi_h3c11f04_101
------------------------------
file name : hdf5-1.10.6-nompi_h3c11f04_101.tar.bz2
name : hdf5
version : 1.10.6
build : nompi_h3c11f04_101
build number: 101
size : 3.0 MB
license : HDF5
subdir : linux-64
url : https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.10.6-nompi_h3c11f04_101.tar.bz2
md5 : 9f1ccc4d36edf8ea15ce19f52cf6d601
timestamp : 2020-07-31 12:26:29 UTC
dependencies:
- libgcc-ng >=7.5.0
- libgfortran-ng >=7,<8.0a0
- libstdcxx-ng >=7.5.0
- zlib >=1.2.11,<1.3.0a0
The difference here is that the latter works with older versions of libgcc-ng, libstdcxx-ng, and libgfortran-ng (below 9.3.0), as well as has no constraint on openssl or libcurl. So, we can guess that the current environment where the conda install h5py=3.2.1 was invoked has one of these restrictions.

Conda: I installed `conda-build` 3.19.2 but version listed is 3.18.11

This is kinda weird--I installed the latest version 3.19.2 of conda-build in an environment, but I cannot seem to access that latest version. The environment keeps referencing version 3.18.11.
I want to use conda-build version 3.19.2 and I installed it in my environment. But for some reason I cannot seem to access it.
Here is a way to recreate the issue. Note that I am using conda-forge so that is setup in my .condarc.
create a new anaconda environment using conda version 4.8.3.
conda create -c conda-forge -n pkg-builder conda-build
When I check the conda-build version it indicates 3.19.2
conda list conda-build
Name Version Build Channel \
conda-build 3.19.2 py38h32f6830_2 conda-forge
When I try and use conda-build it reads an older version
conda build --version
>>> 3.18.11
Conda info reads shows the wrong version too--even though the higher level is installed.
conda info
active environment : pkg-builder
active env location : /../anaconda3/envs/pkg-builder
shell level : 3
user config file : /../.condarc
populated config files : /../.condarc
conda version : 4.8.3
conda-build version : 3.18.11 <--------THIS IS THE WRONG VERSION - SHOULD BE 3.19.2
python version : 3.8.3.final.0
virtual packages : __cuda=10.0
__glibc=2.27
base environment : /../anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
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
package cache : /../anaconda3/pkgs
/../.conda/pkgs
envs directories : /../anaconda3/envs
/../.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/4.15.0-112-generic
ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : /../.netrc
offline mode : False
How can I access the correct version of conda-build?

How do I see the summary or description for a conda package?

conda packages (can) have a summary and description in their metadata. I'd like to read those somehow using conda, to help decide what packages to install. However, the most information I can find is from conda search -i, e.g.
$ conda search -i optionsfactory
Loading channels: done
optionsfactory 1.0.3 py_0
-------------------------
file name : optionsfactory-1.0.3-py_0.tar.bz2
name : optionsfactory
version : 1.0.3
build : py_0
build number: 0
size : 22 KB
license : BSD-3-Clause
subdir : noarch
url : https://conda.anaconda.org/conda-forge/noarch/optionsfactory-1.0.3-py_0.tar.bz2
md5 : f8db4dd5600ad38b5f6ecae5f6f7d2ad
timestamp : 2020-05-13 08:04:25 UTC
dependencies:
- python >=3.6
which isn't helpful for finding out what the package actually does.

how to install conflicting packages?

I have both anaconda for python 2.7 and for python 3 installed on my machine.
I am trying to install user-agents (https://github.com/selwin/python-user-agents) and I get the following error:
(base) C:\Users\john>conda install user-agents
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- user-agents
- zict
Use "conda info <package>" to see the dependencies for each package.
I have looked at the FAQ https://conda.io/docs/user-guide/tasks/manage-python.html but I do not understand how to avoid this issue. Running the -info command on both packages shows
(base) C:\Users\john>conda info user-agents
user-agents 1.1.0 py27_0
------------------------
file name : user-agents-1.1.0-py27_0.tar.bz2
name : user-agents
version : 1.1.0
build string: py27_0
build number: 0
channel : https://conda.anaconda.org/conda-forge/win-64
size : 16 KB
arch : x86_64
constrains : ()
license : MIT
license_family: MIT
md5 : 98e6b4d286813445d0a2f222ca3f08fa
platform : win32
subdir : win-64
url : https://conda.anaconda.org/conda-forge/win-64/user-agents-1.1.0-py27_0.tar.bz2
dependencies:
python 2.7*
ua-parser >=0.4.1
user-agents 1.0.1 py34_0
------------------------
file name : user-agents-1.0.1-py34_0.tar.bz2
name : user-agents
version : 1.0.1
build string: py34_0
build number: 0
channel : https://conda.anaconda.org/conda-forge/win-64
size : 12 KB
arch : x86_64
constrains : ()
license : MIT
md5 : 960c836c6c8fd5e7a126c15b39be5d35
platform : win32
subdir : win-64
url : https://conda.anaconda.org/conda-forge/win-64/user-agents-1.0.1-py34_0.tar.bz2
dependencies:
python 3.4*
ua-parser >=0.4.1
user-agents 1.0.1 py27_1
------------------------
file name : user-agents-1.0.1-py27_1.tar.bz2
name : user-agents
version : 1.0.1
build string: py27_1
build number: 1
channel : https://conda.anaconda.org/conda-forge/win-64
size : 13 KB
arch : x86_64
constrains : ()
license : MIT
md5 : 9c829288911183766ddaa741f537b6ca
platform : win32
subdir : win-64
url : https://conda.anaconda.org/conda-forge/win-64/user-agents-1.0.1-py27_1.tar.bz2
dependencies:
python 2.7*
ua-parser >=0.4.1
user-agents 1.0.1 py27_0
------------------------
file name : user-agents-1.0.1-py27_0.tar.bz2
name : user-agents
version : 1.0.1
build string: py27_0
build number: 0
channel : https://conda.anaconda.org/conda-forge/win-64
size : 12 KB
arch : x86_64
constrains : ()
license : MIT
md5 : 5f8bff4eecc0921d8ff6637c5214a69d
platform : win32
subdir : win-64
url : https://conda.anaconda.org/conda-forge/win-64/user-agents-1.0.1-py27_0.tar.bz2
dependencies:
python 2.7*
ua-parser >=0.4.1
user-agents 1.0.1 py34_1
------------------------
file name : user-agents-1.0.1-py34_1.tar.bz2
name : user-agents
version : 1.0.1
build string: py34_1
build number: 1
channel : https://conda.anaconda.org/conda-forge/win-64
size : 13 KB
arch : x86_64
constrains : ()
license : MIT
md5 : 968c308d3f28527d010ab1ea7e08f043
platform : win32
subdir : win-64
url : https://conda.anaconda.org/conda-forge/win-64/user-agents-1.0.1-py34_1.tar.bz2
dependencies:
python 3.4*
ua-parser >=0.4.1
Can someone please tell me what is the correct conda command here?
Thanks!

Downgrade Python to 3.5 - conflict with ppft/xz

I would like to downgrade Python from 3.6 to 3.5. conda tells me the following:
$ conda install python=3.5.0 -n myenv
Fetching package metadata .........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- ppft -> python 3.6* -> xz 5.2.*
- python 3.5.0*
Now knowing any of the packages in the first line, conda info ppft gives me ResolvePackageNotFound. conda info xz gives me a long list of versions, the latest of which is
xz 5.2.3 0
----------
file name : xz-5.2.3-0.tar.bz2
name : xz
version : 5.2.3
build string: 0
build number: 0
channel : defaults
size : 667 KB
arch : x86_64
date : 2017-08-18
license : Public-Domain, GPL
license_family: GPL2
md5 : 585458787b315ac1e5fb3a1ee71cad75
noarch : None
platform : linux
url : https://repo.continuum.io/pkgs/free/linux-64/xz-5.2.3-0.tar.bz2
dependencies:
How do I continue - what's going on?
First off ppft is not listed in the default anaconda directory but in conda-forge. But if you take a look at the files in that directory you will find there are versions for python 3.5. Furthermore according to the homepage for xz, it is compatible with python 2 or 3.
One option would be to remove the conflicting libraries, downgrade to 3.5, and then reinstall the libraries later. For example
conda uninstall ppft xz
conda install python=3.5 -n myenv
conda install xz
conda install -c conda-forge ppft

Categories

Resources