python – How do I force conda to create an environment from yml?
I am trying to create a virtual environment with conda that the rest of my team uses. Following the same steps that they use to create the environment produces an error due to conflicting dependent packages. I had a colleague send me their “conda list” and I converted this into a yml. I then tried to build the environment from this with “conda env create -f test_env.yml” When I do this I still get conflicting packages even though I know this environment is functional.
Here is the yml:
name: isaw_env_2
dependencies:
- anaconda-client=1.6.3
- asn1crypto=0.22.0
- bleach=1.5.0
- ca-certificates=2022.07.19
- certifi=2021.5.30
- cffi=1.10.0
- chardet=3.0.4
- click=6.7
- clyent=1.2.2
- colorama=0.3.9
- cryptography=1.8.1
- decorator=4.1.2
- entrypoints=0.2.3
- flask=0.12.2
- html5lib=0.9999999
- icc_rt=2022.1.0
- icu=58.2
- idna=2.6
- intel-openmp=2022.1.0
- ipykernel=4.6.1
- ipython=6.1.0
- ipython_genutils=0.2.0
- ipywidgets=6.0.0
- itsdangerous=0.24
- jedi=0.10.2
- jinja2=2.9.6
- jpeg=9e
- jsonschema=2.6.0
- jupyter=1.0.0
- jupyter_client=5.1.0
- jupyter_console=5.2.0
- jupyter_core=4.3.0
- libpng=1.6.37
- markupsafe=1.0
- mistune=0.7.4
- mkl=2018.0.3
- mkl_fft=1.0.6
- mkl_random=1.0.1
- nbconvert=5.2.1
- nbformat=4.4.0
- notebook=5.0.0
- numpy=1.14.3
- numpy-base=1.14.3
- openssl=1.0.2u
- packaging=16.8
- pandocfilters=1.4.2
- path.py=10.3.1
- pickleshare=0.7.4
- pip=9.0.1
- prompt_toolkit=1.0.15
- pycparser=2.18
- pygments=2.2.0
- pyopenssl=17.0.0
- pyparsing=2.2.0
- pyqt=5.6.0
- pysocks=1.6.6
- python=3.6.10
- python-dateutil=2.6.1
- python-levenshtein=0.12.2
- pytz=2017.2
- pyyaml=3.12
- pyzmq=16.0.2
- qt=5.6.2
- qtconsole=4.3.1
- requests=2.18.4
- scikit-learn=0.19.1
- scipy=1.0.1
- setuptools=36.4.0
- simplegeneric=0.8.1
- sip=4.18
- six=1.10.0
- sqlite=3.39.2
- tbb=2021.5.0
- tbb4py=2021.3.0
- testpath=0.3.1
- tornado=4.5.2
- traitlets=4.3.2
- urllib3=1.21.1
- vc=14.2
- vs2015_runtime=14.27.29016
- wcwidth=0.1.7
- werkzeug=0.12.2
- wheel=0.29.0
- widgetsnbextension=3.0.2
- win_inet_pton=1.0.1
- wincertstore=0.2
- xlrd=1.0.0
- zlib=1.2.12
Here is the error message that appears:
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package scikit-learn conflicts for:
mkl_fft=1.0.6 -> mkl[version='>=2019.4,<2021.0a0'] -> scikit-learn[version='0.13.1|0.14.1|0.15.0b1|0.15.2|0.16.1']
scikit-learn=0.19.1
No matter how I try this, I cannot get scikit-learn version 0.19.1 and this is the most important package version that needs to be exact.
The only other detail that I think might be relevant is that the python version I need for the environment is 3.6.10. The python version on my base environment is 3.7.4. Could this be the issue? Should I totally uninstall python and reinstall version 3.6.10 as the base version?
I have tried creating an environment with python=3.6.10 and then trying to install scikit-learn 0.19.1 after the initial creation. I’ve tried creating them together.
I have tried creating an environment from a yml file from a colleagues environment that is functional.
I have tried removing the conflicting package from the yml and trying again; hoping this would allow the compatible package to be determined by anaconda. But doing this results in a new conflicting package. Repeating this process eventually results in an entire list of conflicting packages.
Read more here: Source link
