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...
Related
after using conda extensively for a while, I was asked to update it yesterday and now things look broken. I have to admit that I am not an expert of what goes on behind the scenes so bear with me :)
After installing conda I used pip to install the various packages.
Yesterday I started working on some code from a tutorial on git, which suggested to create an ad-hoc environment to work with:
conda env create -f binder/environment.yml
At this step I was suggested to update conda, since I was using an old version. I can't find in my terminal that specific message (i.e. I can't find what version of conda I was using before), but here is what I get now when I check the version of conda:
(base) francesco ~$ conda list conda
# packages in environment at /Users/francesco/anaconda3:
#
# Name Version Build Channel
_anaconda_depends 2019.03 py36_0
anaconda custom py36_1
anaconda-client 1.7.2 py36_0
anaconda-navigator 1.8.7 py36_0
anaconda-project 0.8.4 py_0
conda 4.8.3 py36_0
conda-build 3.10.5 py36_0
conda-env 2.6.0 h36134e3_0
conda-package-handling 1.6.0 py36h1de35cc_0
conda-verify 3.4.2 py_1
One of the things I noticed after the update is that in order to activate/deactivate the environment I had to use conda activate/deactivate <env> instead of source activate/deactivate <env>.
After that I worked with the code in the new environment without any problem.
Today I tried to activate the main environment I work with, but I was asked to "init" my shell first with:
conda init bash
After that I activated my "usual" environment:
conda activate testenv
and I tried to start Jupyter Lab, but I got this error:
(testenv) francesco ~$ jupyter lab
Error executing Jupyter command 'lab': [Errno 2] No such file or directory
What is happening? Why is Jupyter Lab not working anymore in my usual environment?
I checked the installation in testenv and things look ok:
(testenv) francesco ~$ conda list | grep jup
jupyter 1.0.0 py37_7
jupyter_client 5.2.4 py37_0
jupyter_console 6.0.0 py37_0
jupyter_core 4.4.0 py37_0
(testenv) francesco ~$ pip list | grep jup
jupyter 1.0.0
jupyter-client 5.2.4
jupyter-console 6.0.0
jupyter-core 4.4.0
(testenv) francesco ~$
Does anyone know what is going on? This is a huge problem for me as conda/jupyter lab are the main tools I use for work :\
The common practice is to only install Jupyter in a single Conda environment (typically your base env if an Anaconda user), and always launch Jupyter from there. To use other Python envs in Jupyter, you need to install ipykernel in those envs, e.g.,
conda install -n testenv ipykernel
And, to avoid having to register your additional envs, it is recommended to install nb_conda_kernels in the env with Jupyter, e.g.,
conda install -n base nb_conda_kernels
As a side note, installing things with Pip can make environments unstable. I strongly recommend learning and adhering to the documented best practices.
#FrancescoLS It seems that you had perhaps an older version of Conda installed(?) as the CHANGELOG indicates that source activate was deprecated in favor of conda activate in Conda v4.4.0 (as is also noted in this "How to Get Ready for the Release of conda 4.4" post from Anaconda).
This really isn't an "answer" in any actionable way, but it seems that you are not alone in Conda update breaking people's environments.
superuser: Conda update conda does extra stuff and destroy my anaconda install
Conda Issue #8842: Conda Deletes All Modules During Update
there are lots more. :/
I think it is safe to say that keeping virtual environments safely intact during an upgrade is hard to do, and that when doing a major upgrade across virtual environment maintainers (Conda) it is even harder. This is one of the reasons that I personally try to have all of my project virtual environments be maintained either in native Python 3 venv virtual environments with pip or through Poetry (as they are (or at least used to be) way faster to restore than having to go through Conda's slower solver) and then only resorting to using Conda when I need to bring in multiple external binary applications.
Were you able to make a new Conda environment for your work that effectively restores it (perhaps from your own environment.yml file for that environment)?
I am trying to install qiime1 environment using terminal on Mac. Currently getting an error saying packages not found for matplotlib 1.4.3.
I struggled with the same issue, matplotlib 1.4.3 package not found, and subsequently tried many different solutions, pip install and so on. So I am posting the solution that worked for me, I cannot remember where I found the different suggestions, but the downgrade of conda was key to make it work (thanks to whomever it was that suggested it in the first place):
conda config --set allow_conda_downgrades true
conda install conda=4.6.14
conda create -n qiime1 python=2.7 qiime matplotlib=1.4.3 mock nose -c bioconda
print_qiime_config.py -t
Once you've installed qiime you can upgrade your conda to the most recent version if you like
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:
Anaconda's current version is 1.8.7. Version 1.9.7 is now available but I cannot update it due to this error:
NoBaseEnvironmentError.
For Conda, current is 4.6.1 and error is:
NoBaseEnvironmentError: This conda installation has no default base environment.
I could not find any references online. Looking forward to help on this one!
This does not work for me...
(py3) mac-pro : puiseux$ conda activate base
(base) mac-pro : puiseux$ conda update -n base -c defaults conda
NoBaseEnvironmentError: This conda installation has no default base environment...
run the command:
conda activate base
you will get it
I just installed Anaconda on a Windows 10 machine and the first thing I did thereafter was go into the Anaconda Prompt and run conda udpate conda and then conda update --all. As expected, it updated a lot of stuff. When I then ran Spyder, however, I got a pop-up saying that a new version of Spyder was available.
What? I just updated everything. Checking conda list I see that sypder 3.2.4 is indeed installed, so I do the following:
(base) C:\Users\Mark>conda update --all
Solving environment: done
All requested packages already installed.
(base) C:\Users\Mark>conda update spyder
Solving environment: done
Package Plan
environment location: C:\Users\Mark\Anaconda3
added / updated specs:
- spyder
The following packages will be downloaded:
package | build
---------------------------|-----------------
spyder-3.2.6 | py36_0 2.6 MB
The following packages will be UPDATED:
spyder: 3.2.4-py36h8845eaa_0 --> 3.2.6-py36_0
Proceed ([y]/n)?
Why is conda update -all not finding and updating my installed version of Spyder?
Have you tried just updating spyder?
conda update spyder
I had some similar behavior (on Linux) with conda, there it helped to be more specific:
conda update spyder=3.2.6
"NOTE: Conda updates to the highest version in its series, so Python 2.7 updates to the highest available in the 2.x series and 3.6 updates to the highest available in the 3.x series."
documentation conda
Try:
conda update -n base conda
Here, base is my current environment