Update URLs used by conda for Linux 64 packages - python

I am using conda version 3.19.0 from Ubuntu 14.04 64-bit. When I try conda update conda I receive:
$ conda update conda
Fetching package metadata: .......Error: Could not find URL: http://repo.continuum.io/pkgs/gpl/linux-64/
The output of conda --debug update conda is not very informative in this case. But I did notice at http://repo.continuum.io/pkgs/ that the correct URL now seems to be:
http://repo.continuum.io/pkgs/free/linux-64/
Is there a way to change conda's configuration to look there instead of the gpl/linux-64 URL that appears to be deprecated?
I have never manually adjusted .condarc. Will removing the /gpl/... URL there solve it without requiring me to do additional manual URL management and without compromising any other conda defaults or settings?

As you suspect, this error is caused by an offending entry in your ~/.condarc, namely the following entry under channels:
http://repo.continuum.io/pkgs/gpl
Remove or comment this entry s.t. you're left with the following:
channels:
- http://repo.continuum.io/pkgs/free

Related

How to fix "HTTP CONNECTION FAILED" error

I just updated my anaconda distribution using conda update --all. There were a few debug messages during the update but it otherwise finished successfully. However, now I can't update any packages. Any time I try, I now get this error:
I am working through a company proxy, but have verified that the proxy info in my .condarc file is accurate. I've also verified that anaconda.com is not blocked by my company. Additionally, I was previously able to update packages without this error. I get this error regardless of which package I try to update, or whether I specify a specific channel. Does anyone have any idea what this could be?
Here's my .condarc settings (excluding proxy information for obvious reasons):
ssl_verify: false
channel_priority: disabled
channels:
defaults
conda-forge
Here are the results of "conda info":
Any idea what the fix for this is?
found the answer (sort of)! It’s something to do with urllib3. I reinstalled conda and pinned urllib3 to version 1.25.11, and now conda updates fine!

What does the value after `=` specify in requrements.txt file?

Following is an excerpt from the requirements.txt file. I understand the value after == specifies the version. What does the value after = specify? Can I exclude it?
icu==67.1=he1b5a44_0
lz4-c==1.9.2=he6710b0_1
xz==5.2.5=h7b6447c_0
qt==4.8.7=2
This happens if the file is created by exporting a conda environment (and in this case it should normally be called something like environment.yml, i.e. a yml file).
If one creates this file with the basic command
conda env export > environment.yml
it exports the strictest definition of the packages, which includes the build number (that's what you see after the second =), and it is often OS-specific. That guarantees that you can reproduce exactly the same environment as the original (but will also not work on other OSs). This issue is also captured in this question. In the vast majority of cases, you should be fine without it and you're free to remove the build numbers. If you have access to this environment, you can export it "properly", like
conda env export > environment.yml --no-build
It signifies that you don't actually have a pip requirements.txt file in the first place. This is a conda export, likely created with conda list --export, and can not be processed with pip.
The value after the = is just a build string, you may think of it is as an identifier to allow installing this exact same build. A version number is not sufficient here, since you may have different builds of the same version.
Example showing the h7b6447c_0 build of the xz package that you referenced:
$ conda search xz=5.2.5 --info
Loading channels: done
xz 5.2.5 h7b6447c_0
-------------------
file name : xz-5.2.5-h7b6447c_0.tar.bz2
name : xz
version : 5.2.5
build : h7b6447c_0
build number: 0
size : 438 KB
license : LGPL-2.1 and GPL-2.0
subdir : linux-64
url : https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.5-h7b6447c_0.tar.bz2
md5 : e17620ef8fc8654e77f53b4f2995b288
timestamp : 2020-04-16 04:36:07 UTC
dependencies:
- libgcc-ng >=7.3.0
Due to requirements.txt doc there is nothing about them, It seems like they are meaningless for pip.
https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format

"Solving Environment" during `conda install -c <my_channel> tensorflow` takes 3+ min but changing the name a bit reduces the time significantly

I am writing a custom conda package for tensorflow. When I name the package "tensorflow" it takes it more than 3 minutes to get past the "solving environment" part but if I change the package name even a little bit, to "tensorflowp3" it loads in around 10 seconds.
I am using the commands -
conda install -c <my_channel> tensorflow
conda install -c <my_package> tensorflowp3
I am not sure why setting a slightly different package name causes such a significant time change. I am specifying which channel the package should be loaded from in the command as well. I have tried doing the same with locally stored packages using the --use-local tag as well but it still behaves the same way as with the channel name. Any help would be very appreciated.
I solved by doing this
open Anaconda Navigator application
select Environment from menu
choose the environment you wanna use (base enviroment if you don't use multiple enviroments)
Update index
Click on channels and remove all eventual channel, but default
Now, for me it takes a reasonable abount of time to install a new packet.

Not able to create conda environment in macboook air(Resolvepackagenotfound)

i have been trying to create an conda environment but i keep getting error saying resolve package not found however all the packages are already install.Even when i try to install any of the packages seperately it says package already installed.here is the error what i get
conda env create -f tfdl_env.yml
Solving environment: failed
ResolvePackageNotFound:
win_unicode_console==0.5=py35_0
tk==8.5.18=vc14_0
qt==5.6.2=vc14_6
vs2015_runtime==14.0.25420=0
libpng==1.6.30=vc14_1
openssl==1.0.2l=vc14_0
wincertstore==0.2=py35_0
jpeg==9b=vc14_0
six==1.10.0=py35_1
zlib==1.2.11=vc14_0
icu==57.1=vc14_0
I have encountered a similar problem, what I did to solve the problem was I removed all of those libraries which causing errors, by editing the .yml file. Why I did this? because some of packages are actually just support packages to others, which in my case the version of those packages didn't available any longer or didn't fit, but don't worry, once you update the .yml and re-run the command again, which in your case is "conda env create -f tfdl_env.yml", those failed package will be installed accordingly, triggered by the main packages that requiring those packages and find the most suited package.
Hope it helps.
Delete the mentioned packages by editing the .yml file and run the command for environment creation. It works fine. Hope this helps.

Downgrade to previous version of Spyder

I'm currently using the Anaconda package with Python 2.7.9-1
Yesterday I upgraded the Spyder-app via the Anaconda Launcher and all of my scripts now crash. (Some bugs are already reported in the issues page https://github.com/spyder-ide/spyder/issues).
How can I downgrade to the previous Spyder version meanwhile those bugs are fixed?
You can install a specific version of spyder with conda. For instance, to install 2.3.5.2, run
conda install spyder-app=2.3.5.2
in the terminal.
In Anaconda Navigator, on Spyder tab, you have a settings symbol on top right corner. Press that and select 'Install specific version' option
Thanks for the answers.
What worked in the end was the following (I have windows 7 and the Anaconda Package):
1) In the anaconda prompt, type:
conda list -r
this is going to give you a list of all the packages updates you've done in the past.
2) Check the number of the update where you had the previous version of spyder (for example in my case was 2015-06-25 10:43:34 rev 4) and type:
conda install --revision=4
It would ask you if you want to downgrade, etc and thats it!
Now all scripts run again.
The previous answers didn't work for me, but going here: (https://docs.spyder-ide.org/installation.html). I found the following command works.
conda install -c conda-forge/label/beta spyder=4.1.3
or
conda install spyder=4.1.3*
Note: I had to do this today (7/17/20) where the most recent version is spyder=4.1.4 and I'm getting the following error in the console: "QSocketNotifier: Multiple socket notifiers for same socket 2068 and type Read"
As it is hosted on GitHub, you can find the desired version from the commit history and download that version easily.
First browse the commits:
https://github.com/spyder-ide/spyder/commits/master
After you find the version that doesn't break things. Then you can easily download and install it.
As mentioned before there is an option in the GUI now to select the preferred version.
But before that make sure to run conda update conda. At least in my case that helped.

Categories