Instruction stringlengths 6 217k | input_code stringlengths 0 1.21M | output_code stringlengths 10 1.22M | diff_patch stringlengths 0 759k |
|---|---|---|---|
Don't bail when a dependency can't be found
When a dependency for a package can't be found, conda bails completely, but this can happen e.g., just for some old builds of something. So we should just exclude any package like this from the solver.
| conda/resolve.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from itertools import combinations
from collections import defaultdict
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda... | conda/resolve.py
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from itertools import combinations
from collections import defaultdict
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda.logic import (... | conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -30,6 +30,11 @@ def normalized_version(version):
return version
+class NoPackagesFound(RuntimeError):
+ def __init__(self, msg, pkg):
+ super(NoPackagesFound, self).__init__(msg)
+ self.pkg = pkg
+
const_pat = re.compile(r'... |
Make the conda install table easier to read
The table of what packages will be installed and removed is hard to read. For one thing, it's hard to tell easily what packages are not removed but just upgraded or downgraded. Also, the "link" terminology is confusing.
A suggestion by @jklowden:
```
$ conda update conda ... | conda/cli/main_remove.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, abso... | conda/cli/main_remove.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
fr... | conda/cli/main_remove.py
--- a/conda/cli/main_remove.py
+++ b/conda/cli/main_remove.py
@@ -63,6 +63,7 @@ def execute(args, parser):
from conda.api import get_index
from conda.cli import pscheck
from conda.install import rm_rf, linked
+ from conda import config
if not (args.all or args.package_n... |
NoPackagesFound does not work correctly for missing recursive dependencies
| conda/resolve.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from itertools import combinations
from collections import defaultdict
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda... | conda/resolve.py
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from itertools import combinations
from collections import defaultdict
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda.logic import (... | conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -278,12 +278,25 @@ def all_deps(self, root_fn, max_only=False):
def add_dependents(fn1, max_only=False):
for ms in self.ms_depends(fn1):
+ found = False
+ notfound = []
for pkg2 in se... |
TLS does not appear to be verified
As far as I can tell conda is just using urllib2 which doesn't verify SSL at all in Python 2.x and in Python 3.x it doesn't do it by default. This means that even recipes which use a https link without a md5 hash there is a simple MITM code execution attack.
<!---
@huboard:{"order":1... | conda/connection.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
from lo... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -7,106 +7,368 @@
from __future__ import print_function, division, absolute_import
from logging import getLogger
+import re
+import mimetypes
+import os
+import email
+import base64
+import ftplib
+import cgi
+from io import BytesIO
-from c... |
Add ability to keep retrying with a lock error
The yum installer (IIRC) has a nice feature that it will keep trying every 10 seconds or so if there is a lock error. This could be useful for conda.
| conda/lock.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
"""
Tools for working with locks
A lock is just an empty direct... | conda/lock.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
"""
Tools for working with locks
A lock is just an empty directory. We use dir... | conda/lock.py
--- a/conda/lock.py
+++ b/conda/lock.py
@@ -19,7 +19,7 @@
import os
from os.path import join
import glob
-
+from time import sleep
LOCKFN = '.conda_lock'
@@ -36,15 +36,28 @@ def __init__(self, path):
self.remove = True
def __enter__(self):
- files = glob.glob(self.pattern)
-... |
conda does not prompt for proxy username and password
```
[ COMPLETE ] |#################################################| 100%
The batch file cannot be found.
C:\Code>conda update conda
Fetching package metadata: .Error: HTTPError: 407 Client Error: Proxy Authentication Required: http://repo.continuum.io/p... | conda/config.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impo... | conda/config.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
i... | conda/config.py
--- a/conda/config.py
+++ b/conda/config.py
@@ -244,7 +244,10 @@ def get_allowed_channels():
def get_proxy_servers():
res = rc.get('proxy_servers')
- if res is None or isinstance(res, dict):
+ if res is None:
+ import requests
+ return requests.utils.getproxies()
+ if isin... |
`conda create --file deps.txt pkg1 pkg2 ... pkgn` doesn't work
```
$ echo "scipy" > deps.txt
$ conda create -n test08 --file deps.txt sympy
Fetching package metadata: ..
Solving package specifications: .
Package plan for installation in environment /home/mateusz/py/envs/test08:
The following packages will be linked:
... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
import... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -143,10 +143,10 @@ def install(args, parser, command='install'):
common.ensure_override_channels_requires_channel(args)
channel_urls = args.channel or ()
+ specs = []
if args.file:
- specs = common.specs_from_url(ar... |
conda command-line tool provides a convenience command to run the Python executable from a specified conda environment
I often want to run the Python interpreter from a specific conda environment while knowing only the name of that environment. I know that `conda -e` gives the path to each conda environment, from which... | conda/cli/main_run.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolut... | conda/cli/main_run.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
impor... | conda/cli/main_run.py
--- a/conda/cli/main_run.py
+++ b/conda/cli/main_run.py
@@ -7,6 +7,7 @@
from __future__ import print_function, division, absolute_import
import sys
+import logging
from conda.cli import common
@@ -17,6 +18,7 @@ def configure_parser(sub_parsers):
description... |
Use rmtree workaround for write-protected files on Windows
See https://stackoverflow.com/questions/1889597/deleting-directory-in-python/1889686#1889686. Alternately we can use rd /s.
| conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -155,11 +155,20 @@ def rm_rf(path, max_retries=5):
shutil.rmtree(path)
return
except OSError as e:
- log.debug("Unable to delete %s (%s): retrying after %s "
- "second... |
Only try updating outdated packages with update --all
conda update --all tends to fail a lot because it requires that the whole environment become satisfiable, and without downgrading any packages. Perhaps a better solution would be to only try installing those packages that are known to be outdated.
Another idea wou... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
import... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -191,13 +191,13 @@ def install(args, parser, command='install'):
"prefix %s" % prefix)
for pkg in linked:
name, ver, build = pkg.rsplit('-', 2)
- if name in getattr(args, '_skip', []):
+ ... |
conda clean -t fails with FileNotFoundError
```
[root@localhost conda-recipes]# conda clean -t
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Include the output of the command 'conda info' in your report... | conda/cli/main_clean.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolu... | conda/cli/main_clean.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
from... | conda/cli/main_clean.py
--- a/conda/cli/main_clean.py
+++ b/conda/cli/main_clean.py
@@ -8,6 +8,7 @@
from argparse import RawDescriptionHelpFormatter
import os
import sys
+from collections import defaultdict
from os.path import join, getsize, isdir
from os import lstat, walk, listdir
@@ -102,29 +103,29 @@ def rm_... |
conda remove --dry-run actually removes the package
Is there anything set around here:
https://github.com/conda/conda/blob/ded940c3fa845bbb86b3492e4a7c883c1bcec10b/conda/cli/main_remove.py#L196
to actually exit before removing the package if --dry-run is set but --json is not?
I'm just running 3.11.0 and haven't gra... | conda/cli/main_remove.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, abso... | conda/cli/main_remove.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
fr... | conda/cli/main_remove.py
--- a/conda/cli/main_remove.py
+++ b/conda/cli/main_remove.py
@@ -190,6 +190,9 @@ def execute(args, parser):
return
+ if not args.json:
+ common.confirm_yn(args)
+
if args.json and not args.quiet:
with json_progress_bars():
plan.execute_actions(... |
https proxy username/password
I have installed anaconda using the command "bash Anaconda-2.3.0-Linux-x86_64.sh" and gave path of bin/conda to .bashrc and default it asks for bin path prepending which I gave, after closing and then running terminal I ran:
conda create -n dato-env python=2.7
which requires https proxy un... | conda/fetch.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impor... | conda/fetch.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
im... | conda/fetch.py
--- a/conda/fetch.py
+++ b/conda/fetch.py
@@ -185,6 +185,10 @@ def handle_proxy_407(url, session):
# We could also use HTTPProxyAuth, but this does not work with https
# proxies (see https://github.com/kennethreitz/requests/issues/2061).
scheme = requests.packages.urllib3.util.url.parse_ur... |
Set the default CondaSession.verify default from the config setting
Currently, the .condarc config setting must be explicitly used when making a request with a CondaSession object. This means that anyone who wants to use CondaSession must check the .condarc ssl_verify value and appropriately interpret it, etc. (For e... | conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
from lo... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -19,7 +19,7 @@
import conda
from conda.compat import urlparse, StringIO
-from conda.config import get_proxy_servers
+from conda.config import get_proxy_servers, ssl_verify
import requests
@@ -82,6 +82,7 @@ def __init__(self, *args, **kw... |
`conda.install.update_prefix` is modifying cached pkgs in Windows
Since files are hardlinks, it looks like conda's prefix replacement mechanism is breaking its own files.
File contents inside package:
``` python
x = r'/opt/anaconda1anaconda2anaconda3\Scripts',
```
File contents after installing in 'env1':
``` pytho... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -272,6 +272,7 @@ def update_prefix(path, new_prefix, placeholder=prefix_placeholder,
if new_data == data:
return
st = os.lstat(path)
+ os.remove(path) # Remove file before rewriting to avoid destroying hard-linked cache.
with o... |
recursion problem or infinite loop in dependency solver
I am executing this command:
``` bash
/opt/wakari/miniconda/bin/conda update --dry-run -c https://conda.anaconda.org/wakari/channel/release:0.8.0 -p /opt/wakari/wakari-server --all
```
And it appears to loop "forever" (well, for a few minutes, at least", stating... | conda/resolve.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from collections import defaultdict
from functools import partial
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda.logi... | conda/resolve.py
from __future__ import print_function, division, absolute_import
import re
import sys
import logging
from collections import defaultdict
from functools import partial
from conda import verlib
from conda.utils import memoize
from conda.compat import itervalues, iteritems
from conda.logic import (false... | conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -309,7 +309,7 @@ def add_dependents(fn1, max_only=False):
if not found:
raise NoPackagesFound("Could not find some dependencies "
- "for %s: %s" % (ms, ', '.join(notfound)), notfound)
+ ... |
create_default_packages rules out --clone
Hi all,
In case of the .condarc file defining the 'create_default_packages' options, the conda --clone command gives a confusing error messages:
alain@alain-K53E:~$ conda create --name flowersqq --clone snowflakes
Fetching package metadata: ....
Error: did not expect any argum... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
import... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -169,6 +169,8 @@ def install(args, parser, command='install'):
if any(pkg.split('=')[0] == default_pkg for pkg in args.packages):
default_packages.remove(default_pkg)
args.packages.extend(default_package... |
conda install --no-deps still installing deps when installing tarball
When running the following command:
`conda install --no-deps ./matplotlib-1.4.0-np18py27_0.tar.bz2`
You would assume that no dependencies are installed, but conda seems to install the dependencies anyway.
| conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import os
import... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -196,12 +196,14 @@ def install(args, parser, command='install'):
common.check_specs(prefix, specs, json=args.json,
create=(command == 'create'))
- # handle tar file containing conda packages
+
nu... |
`conda.install.rm_rf` can't delete old environments in Windows + Python 2.7
This issue hit me when trying to use `--force` option in `conda env create` (I added this in #102), and it revealed a possible problem with how conda handles links in Windows + Python 2.7.
# Symptom
Trying to delete an environment (not active)... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -27,19 +27,19 @@
from __future__ import print_function, division, absolute_import
-import time
-import os
-import json
import errno
+import json
+import logging
+import os
+import shlex
import shutil
import stat
-import sys
import subprocess
+im... |
conda remove shouldn't fetch the package metadata
It only needs it to print the channel location. It should either get that locally, or at least just use the index cache.
| conda/cli/common.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import re
import os
import sys
import argparse
import contextlib
from os.path import abspath, basename, expanduser, isdir, join
import textwrap
import conda.config as config
from conda import console
from conda.utils i... | conda/cli/common.py
from __future__ import print_function, division, absolute_import
import re
import os
import sys
import argparse
import contextlib
from os.path import abspath, basename, expanduser, isdir, join
import textwrap
import conda.config as config
from conda import console
from conda.utils import memoize
... | conda/cli/common.py
--- a/conda/cli/common.py
+++ b/conda/cli/common.py
@@ -180,6 +180,16 @@ def add_parser_use_index_cache(p):
help="Use cache of channel index files.",
)
+
+def add_parser_no_use_index_cache(p):
+ p.add_argument(
+ "--no-use-index-cache",
+ action="store_false",
+ ... |
Race condition for root environment detection
Periodically, when two conda processes are running at the same time, it is possible to see a race condition on determining whether the root environment is writable. Notice how the following produces two different configs from the same setup:
```
$ conda info & conda info
... | conda/utils.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import logging
import sys
import hashlib
import collections
from functools import partial
from os.path import abspath, isdir, join
import os
log = logging.getLogger(__name__)
stderrlog = logging.getLogger('stderrlog')
def ... | conda/utils.py
from __future__ import print_function, division, absolute_import
import logging
import sys
import hashlib
import collections
from functools import partial
from os.path import abspath, isdir
import os
import tempfile
log = logging.getLogger(__name__)
stderrlog = logging.getLogger('stderrlog')
def can_... | conda/utils.py
--- a/conda/utils.py
+++ b/conda/utils.py
@@ -5,8 +5,10 @@
import hashlib
import collections
from functools import partial
-from os.path import abspath, isdir, join
+from os.path import abspath, isdir
import os
+import tempfile
+
log = logging.getLogger(__name__)
stderrlog = logging.getLogger('st... |
conda clean -pt as non-root user with root anaconda install
I have installed root miniconda at /opt/anaconda. When running
```
conda clean -pt
```
as a lesser user than root, I am seeing errors indicating conda is not checking permissions before attempting to delete package dirs:
```
conda clean -pt
Cache location... | conda/cli/main_clean.py
<|code_start|>
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, divisi... | conda/cli/main_clean.py
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_im... | conda/cli/main_clean.py
--- a/conda/cli/main_clean.py
+++ b/conda/cli/main_clean.py
@@ -151,9 +151,13 @@ def rm_tarballs(args, pkgs_dirs, totalsize, verbose=True):
for pkgs_dir in pkgs_dirs:
for fn in pkgs_dirs[pkgs_dir]:
- if verbose:
- print("removing %s" % fn)
- o... |
conda clean -pt with empty package cache and non-root user
I have a root miniconda install at /opt/anaconda. I ran
```
conda clean -pt
```
successfully as root then immediately tried running the same command as a lesser user. I got this error even though the package cache was empty:
```
Cache location:
There ar... | conda/cli/main_clean.py
<|code_start|>
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, divisi... | conda/cli/main_clean.py
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_im... | conda/cli/main_clean.py
--- a/conda/cli/main_clean.py
+++ b/conda/cli/main_clean.py
@@ -151,9 +151,13 @@ def rm_tarballs(args, pkgs_dirs, totalsize, verbose=True):
for pkgs_dir in pkgs_dirs:
for fn in pkgs_dirs[pkgs_dir]:
- if verbose:
- print("removing %s" % fn)
- o... |
conda clean -p breaks hard linking of new installs
@asmeurer
Following on from conda/conda#68:
On Windows 8 (and probably equally on all other windows versions), `conda clean -p` removes all extracted packaged from the `pkgs` directory even if they are hard linked in some environments.
While all existing environment... | conda/cli/main_clean.py
<|code_start|>
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, divisi... | conda/cli/main_clean.py
# (c) 2012# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_im... | conda/cli/main_clean.py
--- a/conda/cli/main_clean.py
+++ b/conda/cli/main_clean.py
@@ -65,6 +65,95 @@ def configure_parser(sub_parsers):
p.set_defaults(func=execute)
+# work-around for python bug on Windows prior to python 3.2
+# https://bugs.python.org/issue10027
+# Adapted from the ntfsutils package, Copyri... |
confusing error message when boto is missing
If one tries to install from an s3 channel (e.g., `conda install foo -c s3://bar/baz/conda`) while in an environment, this message shows up: `Error: boto is required for S3 channels. Please install it with: conda install boto`. Installing `boto` in the environment doesn't ... | conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
from lo... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -101,7 +101,9 @@ def send(self, request, stream=None, timeout=None, verify=None, cert=None,
import boto
except ImportError:
stderrlog.info('\nError: boto is required for S3 channels. '
- ... |
conda 4.0.2 failure during dependency resolution
This command fails in Linux and OS X
```
conda create -n testconda anaconda accelerate tornado=4.0.2
```
with this traceback:
```
Traceback (most recent call last):
File "/Users/ewelch/miniconda/bin/conda", line 6, in <module>
sys.exit(main())
File "/Users/ewe... | conda/resolve.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import logging
from collections import defaultdict
from itertools import chain
from conda.compat import iterkeys, itervalues, iteritems, string_types
from conda.logic import minimal_unsatisfiable_subset, Clauses
from cond... | conda/resolve.py
from __future__ import print_function, division, absolute_import
import logging
from collections import defaultdict
from itertools import chain
from conda.compat import iterkeys, itervalues, iteritems, string_types
from conda.logic import minimal_unsatisfiable_subset, Clauses
from conda.version impor... | conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -1014,8 +1014,13 @@ def clean(sol):
dashlist(', '.join(diff) for diff in diffs),
'\n ... and others' if nsol > 10 else ''))
+ def stripfeat(sol):
+ return sol.split('[')[0]
... |
activate on master is broken in OSX
@msarahan I'm on master, and I get:
```
$ source activate koo
path:usage: conda [-h] [-V] [--debug] command ...
conda: error: argument command: invalid choice: '..changeps1' (choose from 'info', 'help', 'list', 'search', 'create', 'install', 'update', 'upgrade', 'remove', 'uninstall... | conda/cli/activate.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, join, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import translate_stream, unix_path_to_win, win_path_to_unix, win_pat... | conda/cli/activate.py
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, join, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import translate_stream, unix_path_to_win, win_path_to_unix, win_path_to_cygwin, fi... | conda/cli/activate.py
--- a/conda/cli/activate.py
+++ b/conda/cli/activate.py
@@ -124,10 +124,13 @@ def main():
if rootpath:
path = path.replace(translate_stream(rootpath, win_path_to_cygwin), "")
else:
- path = translate_stream(path, win_path_to_unix)
+ if s... |
BeeGFS hard-links
[BeeGFS](http://www.beegfs.com), a parallel cluster file system, [does not support](https://groups.google.com/forum/#!topic/fhgfs-user/cTJcqGZceVA) `hard-links` between files in differents directories.
Depending on the [configuration](https://groups.google.com/forum/#!topic/fhgfs-user/pvQSo0QWicw), e... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -515,7 +515,12 @@ def try_hard_link(pkgs_dir, prefix, dist):
if not isdir(prefix):
os.makedirs(prefix)
_link(src, dst, LINK_HARD)
- return True
+ # Some file systems (at least BeeGFS) do not support hard-links... |
conda info --json and package lookup
If you set the `--json` flag for `conda info` when searching for packages, you sometimes get nothing:
``` bash
$ conda info numpy=1.11.0=py35_0
Fetching package metadata: ....
numpy 1.11.0 py35_0
-------------------
file name : numpy-1.11.0-py35_0.tar.bz2
name : numpy
ver... | conda/cli/main_info.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolu... | conda/cli/main_info.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
impo... | conda/cli/main_info.py
--- a/conda/cli/main_info.py
+++ b/conda/cli/main_info.py
@@ -148,7 +148,7 @@ def execute(args, parser):
import conda.config as config
from conda.resolve import Resolve
from conda.cli.main_init import is_initialized
- from conda.api import get_index, get_package_versions
+ fr... |
When no condarc is found "no path!" is printed
Why was https://github.com/conda/conda/blob/master/conda/config.py#L115 added?
Is this a debug statement which never got removed?
| conda/config.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impo... | conda/config.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import logg... | conda/config.py
--- a/conda/config.py
+++ b/conda/config.py
@@ -113,7 +113,6 @@ def get_rc_path():
def load_condarc(path):
if not path or not isfile(path):
- print("no path!")
return {}
with open(path) as f:
return yaml_load(f) or {} |
conda v4.1.0rc1 doesn't link conda or activate into created env
The trace below should demonstrate the problem. As an aside, notice that PS1 is also mixed up: two round brackets and no space after '$' sign.
``` bash
ijstokes@petawawa ~ $ which conda
/Users/ijstokes/anaconda/bin/conda
ijstokes@petawawa ~ $ conda -V
c... | conda/cli/activate.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (find_parent_shell, shells, run_in)
on_win = sys.platform == "win... | conda/cli/activate.py
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (find_parent_shell, shells, run_in)
on_win = sys.platform == "win32"
def help(... | conda/cli/activate.py
--- a/conda/cli/activate.py
+++ b/conda/cli/activate.py
@@ -147,13 +147,13 @@ def main():
# this should throw an error and exit if the env or path can't be found.
try:
- binpath = binpath_from_arg(sys.argv[2], shelldict=shelldict)
+ prefix = prefix_from_ar... |
Disable .netrc authentication
Anaconda-Server/support#23
When a user has a `~/.netrc` file present, `requests` will use that file to populate the `Authorization` header (using HTTP Basic auth). When authorization fails, conda falls into an infinite loop retrying.
To fix this problem in `anaconda-client`, I disabled `... | conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import ... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -91,6 +91,8 @@ def __init__(self, *args, **kwargs):
proxies = get_proxy_servers()
if proxies:
self.proxies = proxies
+ self.trust_env = False # disable .netrc file
+ # also di... |
conda.install imports other conda modules
I just noted https://github.com/conda/conda/blob/master/conda/install.py#L47,
however, it has always been a policy that `conda.install` has to be standalone, see:
https://github.com/conda/conda/blob/master/conda/install.py#L22
The problem is that all our installers depend on t... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -44,12 +44,10 @@
from os.path import (abspath, basename, dirname, isdir, isfile, islink,
join, relpath, normpath)
-from conda.compat import iteritems, iterkeys
-from conda.config import url_channel, pkgs_dirs, root_dir
-from cond... |
Add test for conda/install.py imports
https://github.com/conda/conda/pull/2526#issuecomment-220751869
Since this type of bug was introduced by at least three people independently, I think it would be good to add a test for this. The test could be something along the lines of:
```
tmp_dir = tempfile.mkdtemp()
shutil.c... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -85,10 +85,9 @@ def remove_binstar_tokens(url):
# A simpler version of url_channel will do
def url_channel(url):
- return None, 'defaults'
+ return url.rsplit('/', 2)[0] + '/' if url and '/' in url else None, 'defaults'
- #... |
conda search broken for me on master
On master (`4d7286cddf091c0bcf8bd105ad847dd9f57c1ed7`), I now get:
```
$ conda search
...
Traceback (most recent call last):
File "/Users/ilan/python/bin/conda", line 6, in <module>
sys.exit(conda.cli.main())
File "/Users/ilan/conda/conda/cli/main.py", line 120, in main
... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -624,7 +624,8 @@ def add_cached_package(pdir, url, overwrite=False, urlstxt=False):
xdir = None
if not (xpkg or xdir):
return
- url = remove_binstar_tokens(url)
+ if url:
+ url = remove_binstar_tokens(url)
_, scha... |
Another clone bug
```
kfranz@0283:~/continuum/conda *master ❯ conda create --clone root -n rootclone
Source: '/conda'
Destination: '/conda/envs/rootclone'
The following packages cannot be cloned out of the root environment:
- conda-team::conda-4.1.0rc2-py27_0
- conda-build-1.20.1-py27_0
Error: no URL found for p... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -825,9 +825,11 @@ def load_linked_data(prefix, dist, rec=None):
else:
linked_data(prefix)
url = rec.get('url')
- channel, schannel = url_channel(url)
if 'fn' not in rec:
rec['fn'] = url.rsplit('/', 1)[-1] if url else d... |
install.package_cache() broken with cache directory does not exist
I just ran into this bug when building a package with `conda-build`. Before building the package, I cleaned out removed the cache directory `pkgs`. The trachback is as follows:
```
Traceback (most recent call last):
File "/home/ilan/minonda/bin/con... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -689,8 +689,9 @@ def package_cache():
add_cached_package(pdir, url)
except IOError:
pass
- for fn in os.listdir(pdir):
- add_cached_package(pdir, fn)
+ if isdir(pdir):
+ for f... |
Installing packages from files broken in master
```
((p35)) Z:\msarahan\code\conda>conda install --force z:\msarahan\Downloads\numexpr-2.6.0-np110py35_0.tar.bz2
Could not parse explicit URL: z:\msarahan\Downloads\numexpr-2.6.0-np110py35_0.tar.bz2
((p35)) Z:\msarahan\code\conda>conda install --offline z:\msarahan\Downl... | conda/misc.py
<|code_start|>
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import
import os
import re
import shutil
import sys
from collections import defaultdict
from os.path import (abspath, dirname, expandus... | conda/misc.py
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import
import os
import re
import shutil
import sys
from collections import defaultdict
from os.path import (abspath, dirname, expanduser, exists,
... | conda/misc.py
--- a/conda/misc.py
+++ b/conda/misc.py
@@ -9,7 +9,7 @@
import sys
from collections import defaultdict
from os.path import (abspath, dirname, expanduser, exists,
- isdir, isfile, islink, join, relpath)
+ isdir, isfile, islink, join, relpath, curdir)
from .inst... |
Having trouble downloading from osx-64 on Travis CI
_From @jakirkham on June 14, 2016 20:46_
Seems we are now having issues downloading on packages on Travis CI. See the snippet below and this [log](https://travis-ci.org/conda-forge/apache-libcloud-feedstock/jobs/137608834#L369-L376). Note none of the packages below a... | conda/cli/main_config.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absol... | conda/cli/main_config.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
imp... | conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -218,26 +218,21 @@ def execute_config(args, parser):
else:
rc_path = user_rc_path
- # Create the file if it doesn't exist
- if not os.path.exists(rc_path):
- has_defaults = ['channels', 'defaults'] in ... |
conda 4.1 breaks fish integrations
The new version does not work with fish at all. While the .fish script is finally there in the bin directory, it does not seem to kick in, since the new activate.py command is messing with it. How is it supposed to work?
This is the error I get:
```
$ conda activate myenv
Traceback ... | conda/cli/activate.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(comm... | conda/cli/activate.py
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(command, shell):
... | conda/cli/activate.py
--- a/conda/cli/activate.py
+++ b/conda/cli/activate.py
@@ -134,8 +134,11 @@ def main():
if rootpath:
path = path.replace(shelldict['pathsep'].join(rootpath), "")
+ path = path.lstrip()
# prepend our new entries onto the existing path and make sure that the ... |
conda=4.1 no longer respects HTTP_PROXY
My proxy variables are properly set:
```
$ set https_proxy
HTTPS_PROXY=http://myproxy:8080
```
`conda=4.0.8` successfully picks up my `%HTTPS_PROXY%` and installs `conda=4.1`:
```
$ conda install conda=4.1
Fetching package metadata: ..........
Solving package specifications: ... | conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import ... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -90,8 +90,8 @@ def __init__(self, *args, **kwargs):
proxies = get_proxy_servers()
if proxies:
self.proxies = proxies
- self.trust_env = False # disable .netrc file
- # also di... |
Bizarre removal of python
Full report at https://ci.appveyor.com/project/ContinuumAnalytics/conda-build/build/1.0.163#L18
```
Package plan for installation in environment C:\Miniconda3-x64:
The following packages will be downloaded:
package | build
---------------------------|--... | conda/api.py
<|code_start|>
from __future__ import print_function, division, absolute_import
from . import install
from .compat import iteritems, itervalues
from .config import normalize_urls, prioritize_channels, get_channel_urls
from .fetch import fetch_index
from .resolve import Resolve
def get_index(channel_urls... | conda/api.py
from __future__ import print_function, division, absolute_import
from . import install
from .compat import iteritems, itervalues
from .config import normalize_urls, prioritize_channels, get_channel_urls
from .fetch import fetch_index
from .resolve import Resolve
def get_index(channel_urls=(), prepend=Tr... | conda/api.py
--- a/conda/api.py
+++ b/conda/api.py
@@ -35,7 +35,8 @@ def get_index(channel_urls=(), prepend=True, platform=None,
key = prefix + fn
if key in index:
# Copy the link information so the resolver knows this is installed
- index[key]['link'] = info.ge... |
activate symlink error
when using source activate they get this symlink error
> While trying to use the nfs installation with a user account that lacks the write permissions on the installation and the preconfigured environments, I'm getting an error:
>
> Cannot activate environment bash, not have write access to ... | conda/cli/activate.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(comm... | conda/cli/activate.py
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(command, shell):
... | conda/cli/activate.py
--- a/conda/cli/activate.py
+++ b/conda/cli/activate.py
@@ -163,7 +163,8 @@ def main():
conda.install.symlink_conda(prefix, root_dir, shell)
except (IOError, OSError) as e:
if e.errno == errno.EPERM or e.errno == errno.EACCES:
- msg = ("Cannot acti... |
conda list broken in 4.1?
In case it helps I instrumented my `cp1252.py`
``` python
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False):
try:
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
except Exception as exc:
msg ... | conda/cli/main_list.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
... | conda/cli/main_list.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import logging... | conda/cli/main_list.py
--- a/conda/cli/main_list.py
+++ b/conda/cli/main_list.py
@@ -115,8 +115,7 @@ def print_export_header():
def get_packages(installed, regex):
pat = re.compile(regex, re.I) if regex else None
-
- for dist in sorted(installed, key=str.lower):
+ for dist in sorted(installed, key=lambda ... |
Conda install from file fails in version 4.1
I've recently installed linux-32 conda on CentOS 6.2. I confirmed this on linux-64 version as well.
If I run: `conda install ./FILE_1.tar.bz2`, I always get the error:
`Fetching package metadata ...Error: Could not find URL: file:///root/dir1/
`
If i downgrade to conda 4.0.... | conda/config.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impo... | conda/config.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import logg... | conda/config.py
--- a/conda/config.py
+++ b/conda/config.py
@@ -297,6 +297,8 @@ def url_channel(url):
return None, '<unknown>'
channel = url.rsplit('/', 2)[0]
schannel = canonical_channel_name(channel)
+ if url.startswith('file://') and schannel != 'local':
+ channel = schannel = url.rsplit... |
TypeError resulting from conda create
I've just installed anaconda2 on a CentOS 6.8 instance. Now I'm trying to create a new conda environment but am receiving this error:
```
[ebrown@AWS-SYD-AL-T2MIC-SWM-P-ANACONDA01 ~]$ conda create --name testenv python
Fetching package metadata .......
Solving package specificatio... | conda/plan.py
<|code_start|>
"""
Handle the planning of installs and their execution.
NOTE:
conda.install uses canonical package names in its interface functions,
whereas conda.resolve uses package filenames, as those are used as index
keys. We try to keep fixes to this "impedance mismatch" local to this
... | conda/plan.py
"""
Handle the planning of installs and their execution.
NOTE:
conda.install uses canonical package names in its interface functions,
whereas conda.resolve uses package filenames, as those are used as index
keys. We try to keep fixes to this "impedance mismatch" local to this
module.
"""... | conda/plan.py
--- a/conda/plan.py
+++ b/conda/plan.py
@@ -330,7 +330,7 @@ def ensure_linked_actions(dists, prefix, index=None, force=False,
actions[inst.LINK].append('%s %d %s' % (dist, lt, shortcuts))
except (OSError, IOError):
- actions[inst.LINK].append(dist, LINK_COPY, shortcuts)
... |
tarball install windows
@msarahan @mingwandroid What _should_ the `file://` url format be on Windows?
```
________________________ IntegrationTests.test_python3 ________________________
Traceback (most recent call last):
File "C:\projects\conda\tests\test_create.py", line 146, in test_python3
run_command(Comman... | conda/config.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impo... | conda/config.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import logg... | conda/config.py
--- a/conda/config.py
+++ b/conda/config.py
@@ -195,7 +195,9 @@ def get_rc_urls():
return rc['channels']
def is_url(url):
- return url and urlparse.urlparse(url).scheme != ""
+ if url:
+ p = urlparse.urlparse(url)
+ return p.netloc != "" or p.scheme == "file"
def binstar_c... |
conda config --set show_channel_urls yes doesn't work anymore
This is happening since the latest conda update:
``` bat
λ conda config --set show_channel_urls yes
Error: Key: show_channel_urls; yes is not a YAML boolean.
```
It happens with both conda 4.1.1 (local windows py 3.5) and 4.1.0 (appveyor, https://ci.appvey... | conda/cli/main_config.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absol... | conda/cli/main_config.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
imp... | conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -13,7 +13,7 @@
from ..compat import string_types
from ..config import (rc_bool_keys, rc_string_keys, rc_list_keys, sys_rc_path,
user_rc_path, rc_other)
-from ..utils import yaml_load, yaml_dump
+from ..uti... |
Basic access authentification channels broken in 4.1.0
Previously it was possible to have a channel like:
https://user:password@myserver.com
or even have the user and password saved in `.netrc`. conda 4.1.0 and up ignore the credentials and give a 401 error (causing everything to break for users).
```
$ conda instal... | conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import ... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -90,8 +90,6 @@ def __init__(self, *args, **kwargs):
proxies = get_proxy_servers()
if proxies:
self.proxies = proxies
- self.auth = NullAuth() # disable .netrc file. for reference, see
- ... |
conda update conda doesn't get latest conda-env
It's annoying we even have this problem, but...
```
root@default:~ # conda update conda
Fetching package metadata: ......
.Solving package specifications: .........
Package plan for installation in environment /usr/local:
The following packages will be downloaded:
... | conda/plan.py
<|code_start|>
"""
Handle the planning of installs and their execution.
NOTE:
conda.install uses canonical package names in its interface functions,
whereas conda.resolve uses package filenames, as those are used as index
keys. We try to keep fixes to this "impedance mismatch" local to this
... | conda/plan.py
"""
Handle the planning of installs and their execution.
NOTE:
conda.install uses canonical package names in its interface functions,
whereas conda.resolve uses package filenames, as those are used as index
keys. We try to keep fixes to this "impedance mismatch" local to this
module.
"""... | conda/plan.py
--- a/conda/plan.py
+++ b/conda/plan.py
@@ -442,6 +442,7 @@ def install_actions(prefix, index, specs, force=False, only_names=None, always_c
if auto_update_conda and is_root_prefix(prefix):
specs.append('conda')
+ specs.append('conda-env')
if pinned:
pinned_specs = g... |
source activate without arguments breaks source activate/deactivate commands
Running `source activate` without any further arguments on Linux with the latest release makes it so that further activate/deactivate commands do not work. For example:
```
ihenriksen@ubuntu:~$ source activate
prepending /home/ihenriksen/mini... | conda/cli/activate.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(comm... | conda/cli/activate.py
from __future__ import print_function, division, absolute_import
import errno
import os
from os.path import isdir, abspath
import re
import sys
from conda.cli.common import find_prefix_name
from conda.utils import (shells, run_in)
on_win = sys.platform == "win32"
def help(command, shell):
... | conda/cli/activate.py
--- a/conda/cli/activate.py
+++ b/conda/cli/activate.py
@@ -119,14 +119,11 @@ def main():
shelldict = shells[shell]
if sys.argv[1] == '..activate':
path = get_path(shelldict)
- if len(sys.argv) == 3 or sys.argv[3].lower() == root_env_name.lower():
- binpath = b... |
Consider allowing for conda compression that uses deflate rather than bzip2
| conda/fetch.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import... | conda/fetch.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import bz2
im... | conda/fetch.py
--- a/conda/fetch.py
+++ b/conda/fetch.py
@@ -69,18 +69,9 @@ def func(*args, **kwargs):
return res
return func
+
@dotlog_on_return("fetching repodata:")
def fetch_repodata(url, cache_dir=None, use_cache=False, session=None):
- if not ssl_verify:
- try:
- fro... |
file:// URLs don't work anymore with conda 4.1.3
Conda 4.1.3 does not work anymore with **file://** URLs:
```
(E:\Anaconda3) C:\Windows\system32>conda update --override-channels --channel file:///A:/pkgs/free --all
Fetching package metadata ....Error: Could not find URL: file:///A:/pkgs/free/win-64/
```
But `A:\pkgs\... | conda/fetch.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import... | conda/fetch.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import bz2
im... | conda/fetch.py
--- a/conda/fetch.py
+++ b/conda/fetch.py
@@ -98,7 +98,7 @@ def fetch_repodata(url, cache_dir=None, use_cache=False, session=None):
if "_mod" in cache:
headers["If-Modified-Since"] = cache["_mod"]
- if 'repo.continuum.io' in url:
+ if 'repo.continuum.io' in url or url.startswith("fi... |
conda list misses pip-installed wheels
As of conda 4.1, `conda list` no longer captures python packages that were pip-installed and were installed from wheels.
https://www.python.org/dev/peps/pep-0427/#id14
CC @ilanschnell
| conda/egg_info.py
<|code_start|>
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function
from io import open
import os
import re
import sys
from os.path imp... | conda/egg_info.py
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function
from io import open
import os
import re
import sys
from os.path import isdir, isfi... | conda/egg_info.py
--- a/conda/egg_info.py
+++ b/conda/egg_info.py
@@ -29,14 +29,15 @@ def get_site_packages_dir(installed_pkgs):
def get_egg_info_files(sp_dir):
for fn in os.listdir(sp_dir):
- if not fn.endswith(('.egg', '.egg-info')):
+ if not fn.endswith(('.egg', '.egg-info', '.dist-info')):
... |
Would be nice if conda config --get channels listed the channels in priority order
As far as I can tell it currently lists them in reverse order.
| conda/cli/main_config.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absol... | conda/cli/main_config.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
imp... | conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -257,13 +257,19 @@ def execute_config(args, parser):
if isinstance(rc_config[key], (bool, string_types)):
print("--set", key, rc_config[key])
- else:
+ else: # assume the key ... |
conda throws error if allow_other_channels setting is used
The feature to lock down what channels your users are allowed to use stopped working
http://conda.pydata.org/docs/install/central.html#allow-other-channels-allow-other-channels
Reproduced this error in Windows 10 and OS X 10.11.5, if you use this setting in th... | conda/config.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_impo... | conda/config.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
import logg... | conda/config.py
--- a/conda/config.py
+++ b/conda/config.py
@@ -194,7 +194,7 @@ def get_default_urls(merged=False):
return defaults_
def get_rc_urls():
- if rc.get('channels') is None:
+ if rc is None or rc.get('channels') is None:
return []
if 'system' in rc['channels']:
raise Runt... |
conda install from tarball error?
Running into this issue when trying to install directly from a tarball.
```
Traceback (most recent call last):
File "/usr/local/bin/conda2", line 6, in <module>
sys.exit(main())
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -41,7 +41,6 @@
import tarfile
import tempfile
import time
-import tempfile
import traceback
from os.path import (abspath, basename, dirname, isdir, isfile, islink,
join, normpath)
conda/misc.py
--- a/conda/misc.py
+++ b/conda/m... |
[Regression] Conda create environment fails on lock if root environment is not under user control
This issue is introduced in Conda 4.1.0 (Conda 4.0.8 works fine).
```
$ conda create -n root2 python=2 ... | conda/egg_info.py
<|code_start|>
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function
from io import open
import os
import re
import sys
from os.path imp... | conda/egg_info.py
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function
from io import open
import os
import re
import sys
from os.path import isdir, isfi... | conda/egg_info.py
--- a/conda/egg_info.py
+++ b/conda/egg_info.py
@@ -15,6 +15,7 @@
from .misc import rel_path
+
def get_site_packages_dir(installed_pkgs):
for info in itervalues(installed_pkgs):
if info['name'] == 'python':
conda/exceptions.py
--- a/conda/exceptions.py
+++ b/conda/exceptions.py
@@ ... |
conda config needs --prepend; change behavior of --add to --append
referencing https://github.com/conda/conda/issues/2841
- conda config needs `--prepend`
- change behavior of `--add` to `--append`
- un-reverse order of `conda config --get channels`
| conda/cli/main_config.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absol... | conda/cli/main_config.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
imp... | conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -151,21 +151,19 @@ def configure_parser(sub_parsers):
choices=BoolOrListKey()
)
action.add_argument(
- "--add",
+ "--append", "--add",
nargs=2,
action="append",
- help="""A... |
conda create causes: AttributeError: 'dict' object has no attribute 'add'
Trying to clone the root environment with:
```
conda create --clone root --copy -n myenv2
```
Gives:
```
Traceback (most recent call last):
File "/opt/miniconda/bin/conda", line 6, in <module>
sys.exit(main())
File "/opt/miniconda/lib/... | conda/misc.py
<|code_start|>
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import
import os
import re
import shutil
import sys
from collections import defaultdict
from os.path import (abspath, dirname, expandus... | conda/misc.py
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import
import os
import re
import shutil
import sys
from collections import defaultdict
from os.path import (abspath, dirname, expanduser, exists,
... | conda/misc.py
--- a/conda/misc.py
+++ b/conda/misc.py
@@ -46,7 +46,7 @@ def explicit(specs, prefix, verbose=False, force_extract=True, index_args=None,
index_args = index_args or {}
index = index or {}
verifies = []
- channels = {}
+ channels = set()
for spec in specs:
if spec == '@EX... |
put ftp:// back into 4.2
| conda/connection.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_... | conda/connection.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import
from ba... | conda/connection.py
--- a/conda/connection.py
+++ b/conda/connection.py
@@ -6,6 +6,10 @@
from __future__ import print_function, division, absolute_import
+from base64 import b64decode
+
+import ftplib
+
import cgi
import email
import mimetypes
@@ -16,10 +20,12 @@
from io import BytesIO
from logging import get... |
setuptools hard build dependency
Here: https://github.com/conda/conda/blob/master/setup.py#L8
@kalefranz I thought we had agreed that setuptools is not going to be a hard build dependency anymore.
| conda/_vendor/auxlib/packaging.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
=====
Usage
=====
Method #1: auxlib.packaging as a run time dependency
---------------------------------------------------
Place the following lines in your package's main __init__.py
from auxlib import get_version
__version__ = get_version... | conda/_vendor/auxlib/packaging.py
# -*- coding: utf-8 -*-
"""
=====
Usage
=====
Method #1: auxlib.packaging as a run time dependency
---------------------------------------------------
Place the following lines in your package's main __init__.py
from auxlib import get_version
__version__ = get_version(__file__)
M... | conda/_vendor/auxlib/packaging.py
--- a/conda/_vendor/auxlib/packaging.py
+++ b/conda/_vendor/auxlib/packaging.py
@@ -69,11 +69,14 @@
import sys
from collections import namedtuple
from logging import getLogger
-from os import getenv, remove
+from os import getenv, remove, listdir
from os.path import abspath, dirnam... |
Activate issue with parallel activations - "File exists" in symlinked path
I'm working in a cluster environment where I am trying to activate a conda environment in multiple parallel processes. After recently upgrading to the latest release (4.1.2), I've been receiving a "File exists" error in some of those processes, ... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -613,7 +613,7 @@ def symlink_conda_hlp(prefix, root_dir, where, symlink_fn):
symlink_fn(root_file, prefix_file)
except (IOError, OSError) as e:
if (os.path.lexists(prefix_file) and
- (e.errno in (... |
`conda update --all` wants to downgrade from conda-canary (and then things go haywire)
I just did the following to try out conda-canary:
```
>conda config --add channels conda-canary
>conda update conda
...
The following packages will be UPDATED:
conda: 4.1.9-py35_0 --> 4.2.1-py35_0 conda-canary
Proceed ([y]/n)?... | conda/base/constants.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
This file should hold almost all string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
"""
from __future__ import absolute_import, division, pr... | conda/base/constants.py
# -*- coding: utf-8 -*-
"""
This file should hold almost all string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
"""
from __future__ import absolute_import, division, print_function
i... | conda/base/constants.py
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -62,9 +62,9 @@ def from_sys(cls):
'$CONDA_ROOT/condarc',
'$CONDA_ROOT/.condarc',
'$CONDA_ROOT/condarc.d/',
- '$HOME/.conda/condarc',
- '$HOME/.conda/condarc.d/',
- '$HOME/.condarc',
+ '~/.conda/condarc',
+ ... |
Zsh.exe not supported on MSYS2
The following error is reported in a MSYS2 zsh shell:
```
➜ dotfiles git:(master) ✗ source activate py35_32
Traceback (most recent call last):
File "C:\Miniconda3\Scripts\conda-script.py", line 5, in <module>
sys.exit(main())
File "C:\Miniconda3\lib\site-packages\conda\cli\main.... | conda/utils.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import collections
import errno
import hashlib
import logging
import os
import re
import sys
import time
import threading
from functools import partial
from os.path import isdir, join, basename, exists
# conda build import
f... | conda/utils.py
from __future__ import print_function, division, absolute_import
import collections
import errno
import hashlib
import logging
import os
import re
import sys
import time
import threading
from functools import partial
from os.path import isdir, join, basename, exists
# conda build import
from .common.url... | conda/utils.py
--- a/conda/utils.py
+++ b/conda/utils.py
@@ -313,6 +313,12 @@ def human_bytes(n):
"sh.exe": dict(
msys2_shell_base, exe="sh.exe",
),
+ "zsh.exe": dict(
+ msys2_shell_base, exe="zsh.exe",
+ ),
+ "zsh": dict(
+ msys2_shell_base, exe... |
conda canary - unable to create environment yml file
I just did
`
(anabase) (psreldev) psel701: /reg/g/psdm/sw/conda/logs $ conda env export > ../manage/config/environment-anabase-1.0.0.yml`
anabase is the environment, I also add the account, psreldev, that I'm logged into, and got this output
```
n unexpected error ... | conda_env/specs/requirements.py
<|code_start|>
import os
from .. import env
class RequirementsSpec(object):
'''
Reads depedencies from a requirements.txt file
and returns an Environment object from it.
'''
msg = None
def __init__(self, filename=None, name=None, **kwargs):
self.filena... | conda_env/specs/requirements.py
import os
from .. import env
class RequirementsSpec(object):
'''
Reads depedencies from a requirements.txt file
and returns an Environment object from it.
'''
msg = None
def __init__(self, filename=None, name=None, **kwargs):
self.filename = filename
... | conda_env/specs/requirements.py
--- a/conda_env/specs/requirements.py
+++ b/conda_env/specs/requirements.py
@@ -37,6 +37,9 @@ def environment(self):
dependencies = []
with open(self.filename) as reqfile:
for line in reqfile:
+ line = line.strip()
+ if not lin... |
conda canary - unable to create environment yml file
I just did
`
(anabase) (psreldev) psel701: /reg/g/psdm/sw/conda/logs $ conda env export > ../manage/config/environment-anabase-1.0.0.yml`
anabase is the environment, I also add the account, psreldev, that I'm logged into, and got this output
```
n unexpected error ... | conda_env/cli/main_export.py
<|code_start|>
from __future__ import absolute_import, print_function
import os
import textwrap
from argparse import RawDescriptionHelpFormatter
from conda import config
from ..env import from_environment
# conda env import
from conda_env.cli.common import error_and_exit, get_prefix
descri... | conda_env/cli/main_export.py
from __future__ import absolute_import, print_function
import os
import textwrap
from argparse import RawDescriptionHelpFormatter
from conda import config
from ..env import from_environment
# conda env import
from conda_env.cli.common import error_and_exit, get_prefix
description = """
Exp... | conda_env/cli/main_export.py
--- a/conda_env/cli/main_export.py
+++ b/conda_env/cli/main_export.py
@@ -90,7 +90,7 @@ def execute(args, parser):
name = args.name
prefix = get_prefix(args)
env = from_environment(name, prefix, no_builds=args.no_builds,
- ignore_channels=args.ig... |
[Regression] Conda create environment fails on lock if root environment is not under user control
This is "funny", but it seems that Conda managed to break this thing the second time in a month... #2681 was the previous one.
This time, I get the following error:
```
$ conda create -n _root --yes --use-index-cache pyt... | conda/lock.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
"""
Tools for working with locks
A lock is just an empty direct... | conda/lock.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
"""
Tools for working with locks
A lock is just an empty directory. We use dir... | conda/lock.py
--- a/conda/lock.py
+++ b/conda/lock.py
@@ -45,8 +45,11 @@ def touch(file_name, times=None):
Examples:
touch("hello_world.py")
"""
- with open(file_name, 'a'):
- os.utime(file_name, times)
+ try:
+ with open(file_name, 'a'):
+ os.utime(file_name, times)
+ ... |
URLs with :: are OK and should not raise assertion errors
For conda-build's perl skeleton generator, we can end up with URLs like:
http://api.metacpan.org/v0/module/Test::More
Unfortunately, conda prevents us from actually using those URLs:
```
File "/Users/msarahan/miniconda2/lib/python2.7/site-packages/conda/fet... | conda/fetch.py
<|code_start|>
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import... | conda/fetch.py
# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import print_function, division, absolute_import, unicode_liter... | conda/fetch.py
--- a/conda/fetch.py
+++ b/conda/fetch.py
@@ -351,7 +351,6 @@ def fetch_pkg(info, dst_dir=None, session=None):
def download(url, dst_path, session=None, md5=None, urlstxt=False, retries=None):
- assert "::" not in str(url), url
assert "::" not in str(dst_path), str(dst_path)
if not offl... |
CONDA_CHANNELS environment variable doesn't work
fixed with #3390
| conda/common/configuration.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ... | conda/common/configuration.py
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ini
Limitation... | conda/common/configuration.py
--- a/conda/common/configuration.py
+++ b/conda/common/configuration.py
@@ -188,7 +188,7 @@ def __repr__(self):
return text_type(vars(self))
@abstractmethod
- def value(self, parameter_type):
+ def value(self, parameter_obj):
raise NotImplementedError()
... |
Conda 4.2 branch doesn't support CIO_TEST.
In config.py in `conda 4.1.x` I see:
```
def get_channel_urls(platform=None):
if os.getenv('CIO_TEST'):
import cio_test
base_urls = cio_test.base_urls
```
cio_test is not imported anywhere in 4.2.
| conda/base/context.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from conda._vendor.auxlib.path import expand
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, jo... | conda/base/context.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from conda._vendor.auxlib.path import expand
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from platfor... | conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -20,10 +20,10 @@
log = getLogger(__name__)
-
-default_python = '%d.%d' % sys.version_info[:2]
-
-# ----- operating system and architecture -----
+try:
+ import cio_test # NOQA
+except ImportError:
+ log.info("No cio_test packag... |
unsatisfiability crashes conda canary 4.2.5, rather than giving error output
I have a python 3 environment, with the lastest conda in conda-canary, that is
```
Current conda install:
platform : linux-64
conda version : 4.2.5
conda is private : False
conda-env version : 2.6.0
... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
import errno
imp... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -15,7 +15,7 @@
from difflib import get_close_matches
from os.path import abspath, basename, exists, isdir, join
-from .. import CondaError, text_type
+from .. import text_type
from .._vendor.auxlib.ish import dals
from ..api import get_... |
unexpected file locking warnings and errors - nuissance messages
I am getting errors and warnings related to locking when I activate an environment as a user. The only other activity that is going on is that the account used to manage the central install is running conda build to build a package - but it is doing so fr... | conda/common/disk.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, makedirs, renam... | conda/common/disk.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, makedirs, rename, stat, unlink... | conda/common/disk.py
--- a/conda/common/disk.py
+++ b/conda/common/disk.py
@@ -192,7 +192,7 @@ def rm_rf(path, max_retries=5, trash=True):
move_result = move_path_to_trash(path)
if move_result:
return True
- log.warn("Failed to remove %s.... |
conda build - exception - padding error
I just updated to the lastest conda-build in defaults, and latest conda conda-env in conda canary, when I run conda build I am getting a 'package error'. Here is my conda environemnt:
```
platform : linux-64
conda version : 4.2.5
conda is private : False
co... | conda/exceptions.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
import sys
from logging import getLogger
from traceback import format_exc
from . import CondaError, text_type
from .compat import iteritems, iterkeys
l... | conda/exceptions.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
import sys
from logging import getLogger
from traceback import format_exc
from . import CondaError, text_type
from .compat import iteritems, iterkeys
log = logging.ge... | conda/exceptions.py
--- a/conda/exceptions.py
+++ b/conda/exceptions.py
@@ -128,8 +128,9 @@ def __init__(self, *args, **kwargs):
class PaddingError(CondaError):
- def __init__(self, *args):
- msg = 'Padding error: %s' % ' '.join(text_type(arg) for arg in self.args)
+ def __init__(self, dist, placehold... |
Conda Fails with create_default_packages
When using `create_default_packages`, `conda create...` fails.
## Sample condarc:
```
channels:
- defaults
create_default_packages:
- python
- pip
```
## Command
`conda create -n test_conda_update python=2 numpy`
## Error
```
Traceback (most recent call last):
... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
import errno
imp... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -63,7 +63,7 @@ def check_prefix(prefix, json=False):
if name == ROOT_ENV_NAME:
error = "'%s' is a reserved environment name" % name
if exists(prefix):
- if isdir(prefix) and not os.listdir(prefix):
+ if isdir(... |
Unable to conda update --all
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
```
https://github.com/conda/conda/issues
```
Current conda install:
```
platform : win-64
conda version : 4.2.6
conda is private : False
conda-... | conda/common/configuration.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ... | conda/common/configuration.py
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ini
Limitation... | conda/common/configuration.py
--- a/conda/common/configuration.py
+++ b/conda/common/configuration.py
@@ -637,9 +637,11 @@ def __init__(self, element_type, default=None, aliases=(), validation=None):
def collect_errors(self, instance, value, source="<<merged>>"):
errors = super(MapParameter, self).colle... |
Progress bar broken

```
C:\Users\Korijn\dev\myproject>conda info
Current conda install:
platform : win-64
conda version : 4.2.7
conda is private : False
conda-env versio... | conda/base/constants.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
This file should hold almost all string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
"""
from __future__ import absolute_import, division, pr... | conda/base/constants.py
# -*- coding: utf-8 -*-
"""
This file should hold almost all string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
"""
from __future__ import absolute_import, division, print_function
i... | conda/base/constants.py
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -99,6 +99,9 @@ class _Null(object):
def __nonzero__(self):
return False
+ def __bool__(self):
+ return False
+
NULL = _Null()
UTF8 = 'UTF-8' |
Conda prints stuff in stdout even with --json flag on
Conda commands with the `--json` should not print to the console anything unless it is proper json, otherwise assumptions made by parsing clients (Like the Navigator import functionality) break.
Something like
`conda env create -n qatest -f environment.yaml --json... | conda_env/cli/main.py
<|code_start|>
from __future__ import print_function, division, absolute_import
import os
import sys
try:
from conda.exceptions import conda_exception_handler
except ImportError as e:
if 'CONDA_DEFAULT_ENV' in os.environ:
sys.stderr.write("""
There was an error importing conda.
I... | conda_env/cli/main.py
from __future__ import print_function, division, absolute_import
from logging import getLogger, CRITICAL
import os
import sys
try:
from conda.exceptions import conda_exception_handler
except ImportError as e:
if 'CONDA_DEFAULT_ENV' in os.environ:
sys.stderr.write("""
There was a... | conda_env/cli/main.py
--- a/conda_env/cli/main.py
+++ b/conda_env/cli/main.py
@@ -1,4 +1,7 @@
from __future__ import print_function, division, absolute_import
+
+from logging import getLogger, CRITICAL
+
import os
import sys
@@ -66,6 +69,14 @@ def main():
parser = create_parser()
args = parser.parse_args... |
Invalid JSON output
When installing `Jupyter` I sometimes see the following error:
```
post-link :: /etc/machine-id not found ..
bus post-link :: .. using /proc/sys/kernel/random/boot_id
```
When installing with the `--json` flag the error output causes the json to be invalid. Example:
```
root@head:~# conda create... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -1046,7 +1046,8 @@ def messages(prefix):
path = join(prefix, '.messages.txt')
try:
with open(path) as fi:
- sys.stdout.write(fi.read())
+ fh = sys.stderr if context.json else sys.stdout
+ fh.write(fi.re... |
conda update icu (54.1-0 --> 56.1-4 conda-forge)
In a new installation, it appears that going from icu 54 to 56 will fail unless the following is done (at least on linux):
bash Anaconda2-4.2.0-Linux-x86_64.sh
conda remove icu
rm -r $HOME/anaconda2/lib/icu
conda install -c conda-forge icu=56.1
In other words, using th... | conda/common/disk.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, listdir, lstat,... | conda/common/disk.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, listdir, lstat, makedirs, rena... | conda/common/disk.py
--- a/conda/common/disk.py
+++ b/conda/common/disk.py
@@ -6,7 +6,7 @@
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, listdir, lstat, makedirs, rename, unlink, walk
-from os.path import abspath, basename, dirname, isdir, join, lexists
+from o... |
BUG: CONDARC env var broken in latest conda
After upgrading to conda version 4.2.7 the CONDARC env var no longer supports filenames of any format. It appears to only support filenames that end with .yml or .condarc.
This is a functionality regression bug. Can this be fixed immediately!?
**conda info**
Current conda ... | conda/common/configuration.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ... | conda/common/configuration.py
# -*- coding: utf-8 -*-
"""
A generalized application configuration utility.
Features include:
- lazy eval
- merges configuration files
- parameter type validation, with custom validation
- parameter aliases
Easily extensible to other source formats, e.g. json and ini
Limitation... | conda/common/configuration.py
--- a/conda/common/configuration.py
+++ b/conda/common/configuration.py
@@ -23,7 +23,7 @@
from itertools import chain
from logging import getLogger
from os import environ, stat
-from os.path import join
+from os.path import join, basename
from stat import S_IFDIR, S_IFMT, S_IFREG
tr... |
Removal of handle_proxy_407 breaks conda-build
Elevating as issue from https://github.com/conda/conda/commit/b993816b39a48d807e7a9659246266f6035c3dcd#commitcomment-19452072 so that it does not get lost.
Removal of handle_proxy_407 breaks conda-build (it is used in pypi skeleton code for some reason.) Is there an alter... | conda/exports.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from functools import partial
from warnings import warn
from conda import compat, plan
compat = compat
plan = plan
from conda.api import get_index # NOQA
get_index = get_index
from conda.cli.... | conda/exports.py
--- /dev/null
+++ b/conda/exports.py
@@ -0,0 +1,96 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+from functools import partial
+from warnings import warn
+
+from conda import compat, plan
+compat = compat
+plan = plan
+
+from conda.ap... | |
error while searching for `notebook`
I recently installed `ipykernel`, after which, commands
`ipython notebook` produced "ImportError: No module named 'notebook'", and
`jupyter notebook` produced "jupyter: 'notebook' is not a Jupyter command".
So, I ran `conda search notebook` and got the following message:
> Current ... | conda/models/channel.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from itertools import chain
from logging import getLogger
from requests.packages.urllib3.util import Url
from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNEL... | conda/models/channel.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from itertools import chain
from logging import getLogger
from requests.packages.urllib3.util import Url
from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNELS_WIN, UTF8
fro... | conda/models/channel.py
--- a/conda/models/channel.py
+++ b/conda/models/channel.py
@@ -5,7 +5,7 @@
from logging import getLogger
from requests.packages.urllib3.util import Url
-from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNELS_WIN
+from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHAN... |
Installing ompython-2.0.7
Current conda install:
```
platform : osx-64
conda version : 4.2.7
conda is private : False
conda-env version : 4.2.7
conda-build version : not installed
python version : 2.7.12.final.0
requests version : 2.11.1
root environment : /Library/Frameworks/Python.fr... | conda/install.py
<|code_start|>
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extractin... | conda/install.py
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and ... | conda/install.py
--- a/conda/install.py
+++ b/conda/install.py
@@ -281,7 +281,7 @@ def replace(match):
def replace_long_shebang(mode, data):
- if mode is FileMode.text:
+ if mode == FileMode.text:
shebang_match = SHEBANG_REGEX.match(data)
if shebang_match:
whole_shebang, execut... |
--mkdir no longer works
After upgrading to `conda=4.2`:
```
C:\> conda install --mkdir -n name python=3.5
CondaEnvironmentNotFoundError: Could not find environment: name .
You can list all discoverable environments with `conda info --envs`.
```
--mkdir no longer works
After upgrading to `conda=4.2`:
```
C:\> conda i... | conda/cli/install.py
<|code_start|>
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
i... | conda/cli/install.py
# (c) Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
import errno
imp... | conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -142,7 +142,7 @@ def install(args, parser, command='install'):
isinstall = bool(command == 'install')
if newenv:
common.ensure_name_or_prefix(args, command)
- prefix = context.prefix if newenv else context.prefix_w_legac... |
Conda 4.2.x attempts to create lock files in readonly file-based channels and does not respect CONDA_ENVS_PATH
I am getting warnings and eventually an error after upgrading from 4.1.11 to 4.2.7 relating to lock files and packages attempting to write to shared read-only directories in our continuous build.
I modified `... | conda/base/context.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from plat... | conda/base/context.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from platform import mac... | conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -104,6 +104,9 @@ class Context(Configuration):
binstar_upload = PrimitiveParameter(None, aliases=('anaconda_upload',),
parameter_type=(bool, NoneType))
+ _envs_dirs = SequenceParameter(str... |
conda info exposing tokens
Hi, the conda info command is exposing tokens again. Por ejemplo:
```
Current conda install:
platform : win-64
conda version : 4.2.9
conda is private : False
conda-env version : 4.2.9
conda-build version : 2.0.2
python version : 2.7.12.fina... | conda/cli/main_info.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print... | conda/cli/main_info.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function
impo... | conda/cli/main_info.py
--- a/conda/cli/main_info.py
+++ b/conda/cli/main_info.py
@@ -11,6 +11,7 @@
import re
import sys
from collections import OrderedDict
+from conda.common.url import mask_anaconda_token
from os import listdir
from os.path import exists, expanduser, join
@@ -225,6 +226,7 @@ def execute(args, p... |
conda appears to be stuck during update/install: Access Denied Error on Windows
Hi,
At work we have on occasion noticed that some of our build workers were taking unusually long during some `conda update` and `conda install` operations.
After enabling debugging with `-vv` and `-debug`, we identified that Conda was ha... | conda/common/disk.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, listdir, lstat,... | conda/common/disk.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from errno import EACCES, EEXIST, ENOENT, EPERM
from itertools import chain
from logging import getLogger
from os import W_OK, access, chmod, getpid, listdir, lstat, makedirs, rena... | conda/common/disk.py
--- a/conda/common/disk.py
+++ b/conda/common/disk.py
@@ -20,6 +20,8 @@
log = getLogger(__name__)
+MAX_TRIES = 7
+
def try_write(dir_path, heavy=False):
"""Test write access to a directory.
@@ -50,20 +52,21 @@ def try_write(dir_path, heavy=False):
return access(dir_path, W_OK)... |
conda env create giving ImportError for yaml package
`conda env create` suddenly started giving `"ImportError: No module named 'yaml'"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743
I changed nothing significant in my code. Tried rebuilding previous passing builds... | conda_env/yaml.py
<|code_start|>
"""
Wrapper around yaml to ensure that everything is ordered correctly.
This is based on the answer at http://stackoverflow.com/a/16782282
"""
from __future__ import absolute_import, print_function
from collections import OrderedDict
import yaml
def represent_ordereddict(dumper, data... | conda_env/yaml.py
"""
Wrapper around yaml to ensure that everything is ordered correctly.
This is based on the answer at http://stackoverflow.com/a/16782282
"""
from __future__ import absolute_import, print_function
from collections import OrderedDict
from conda.common.yaml import get_yaml
yaml = get_yaml()
def rep... | conda_env/yaml.py
--- a/conda_env/yaml.py
+++ b/conda_env/yaml.py
@@ -5,7 +5,9 @@
"""
from __future__ import absolute_import, print_function
from collections import OrderedDict
-import yaml
+
+from conda.common.yaml import get_yaml
+yaml = get_yaml()
def represent_ordereddict(dumper, data): |
Document that $CONDA_BLD_PATH must end with "/conda-bld" (and stop breaking stuff with minor releases)
On September 30, @kalefranz inserted a new assertion (`name == 'conda-bld'`) into `context.py` ([see here](https://github.com/conda/conda/blame/master/conda/base/context.py#L299)) causing `conda info` to fail when `CO... | conda/base/context.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from plat... | conda/base/context.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from platform import mac... | conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -243,7 +243,6 @@ def local_build_root_channel(self):
location, name = url_parts.path.rsplit('/', 1)
if not location:
location = '/'
- assert name == 'conda-bld'
return Channel(scheme=url_parts... |
regression bug: https://github.com/conda/conda/issues/3235 appears to have resurrected itself in another place
The bug was that conda handled the channel "http://conda-01" incorrectly. Here's the stack trace in conda 4.2.11:
```
Traceback (most recent call last):
File "C:\Miniconda3\lib\site-packages\conda\e... | conda/models/channel.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from itertools import chain
from logging import getLogger
from requests.packages.urllib3.util import Url
from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNEL... | conda/models/channel.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from itertools import chain
from logging import getLogger
from requests.packages.urllib3.util import Url
from ..base.constants import DEFAULT_CHANNELS_UNIX, DEFAULT_CHANNELS_WIN, UTF8
fro... | conda/models/channel.py
--- a/conda/models/channel.py
+++ b/conda/models/channel.py
@@ -73,9 +73,14 @@ def _get_channel_for_name_helper(name):
def _read_channel_configuration(scheme, host, port, path):
# return location, name, scheme, auth, token
- test_url = Url(host=host, port=port, path=path).url.rstrip('... |
conda config --show --json fails with TypeError is not JSON serializable.
```
$conda config --show --json
{
"error": "Traceback (most recent call last):\n File \"C:\\Anaconda\\lib\\site-packages\\conda\\exceptions.py\", line 479, in conda_exception_handler\n return_value = func(*args, **kwargs)\n File \"C:\\A... | conda/cli/main_config.py
<|code_start|>
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, prin... | conda/cli/main_config.py
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function, uni... | conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -13,6 +13,7 @@
from .common import (Completer, add_parser_json, stdout_json_success)
from .. import CondaError
from .._vendor.auxlib.compat import isiterable
+from .._vendor.auxlib.entity import EntityEncoder
from .._vendor.au... |
local install create file: folder
Hi,
A folder named `file:` is always created if I installed conda package locally.
`conda install /local/path/bz2`
related to: https://github.com/conda/conda/issues/3770
```bash
$ conda info
Current conda install:
platform : linux-64
conda versi... | conda/misc.py
<|code_start|>
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import, unicode_literals
import os
import re
import shutil
import sys
from collections import defaultdict
from conda.base.constants imp... | conda/misc.py
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import print_function, division, absolute_import, unicode_literals
import os
import re
import shutil
import sys
from collections import defaultdict
from conda.base.constants import DEFAULTS
fr... | conda/misc.py
--- a/conda/misc.py
+++ b/conda/misc.py
@@ -77,17 +77,17 @@ def explicit(specs, prefix, verbose=False, force_extract=True, index_args=None,
# is_local: if the tarball is stored locally (file://)
# is_cache: if the tarball is sitting in our cache
is_local = not is_url(url) or url... |
Make http timeouts configurable
http://docs.python-requests.org/en/master/user/advanced/#timeouts
Also set defaults to 2x current defaults.
CC @quasiben
| conda/base/context.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isd... | conda/base/context.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
from collections import Sequence
from itertools import chain
from logging import getLogger
from os.path import abspath, basename, dirname, expanduser, isdir, join
from p... | conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -79,6 +79,8 @@ class Context(Configuration):
_channel_alias = PrimitiveParameter(DEFAULT_CHANNEL_ALIAS,
aliases=('channel_alias',),
validation=channel_a... |
Regression: cannot install from explicit conda package filenames
This command used to work, but now it gives the following error/traceback:
Example: `conda install bzip2-1.0.6-vc14_3.tar.bz2 --dry-run`
```
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub i... | conda/common/url.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import socket
import sys
from getpass import getpass
from logging import getLogger
from os.path import abspath, expanduser
try:
# Python 3
from urllib.parse i... | conda/common/url.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import socket
import sys
from getpass import getpass
from logging import getLogger
from os.path import abspath, expanduser
try:
# Python 3
from urllib.parse import (quote, q... | conda/common/url.py
--- a/conda/common/url.py
+++ b/conda/common/url.py
@@ -68,6 +68,8 @@ def url_to_s3_info(url):
def is_url(url):
+ if not url:
+ return False
try:
p = urlparse(url)
return p.netloc is not None or p.scheme == "file" |
Invalid requirement while trying to use pip options
Hi!
I have in my pip section inside envrionment.yaml file this line
```- rep --install-option='--no-deps'```
while I am trying to update my environment I am getting this error
```Invalid requirement: 'rep --install-option='--no-deps''```
if I do pip -r re... | conda/egg_info.py
<|code_start|>
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from io import open
import os
from os.path import... | conda/egg_info.py
"""
Functions related to core conda functionality that relates to manually
installed Python packages, e.g. using "python setup.py install", or "pip".
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from io import open
import os
from os.path import isdir, isfile,... | conda/egg_info.py
--- a/conda/egg_info.py
+++ b/conda/egg_info.py
@@ -30,6 +30,10 @@ def get_site_packages_dir(installed_pkgs):
def get_egg_info_files(sp_dir):
for fn in os.listdir(sp_dir):
+ if fn.endswith('.egg-link'):
+ with open(join(sp_dir, fn), 'r') as reader:
+ for egg in... |
On Windows, conda 4.0.5-py35_0 cannot be updated to 4.3.0-py35_1
On a fresh install of the latest Miniconda on Windows, the following fails:
`conda update -c conda-canary --all`
Giving:
```
Fetching package metadata: ......
Solving package specifications: .........
Package plan for installation in environ... | conda/base/constants.py
<|code_start|>
# -*- coding: utf-8 -*-
"""
This file should hold most string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
Think of this as a "more static" source of configuration infor... | conda/base/constants.py
# -*- coding: utf-8 -*-
"""
This file should hold most string literals and magic numbers used throughout the code base.
The exception is if a literal is specifically meant to be private to and isolated within a module.
Think of this as a "more static" source of configuration information.
Anothe... | conda/base/constants.py
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -12,7 +12,10 @@
from os.path import join
on_win = bool(sys.platform == "win32")
-PREFIX_PLACEHOLDER = '/opt/anaconda1anaconda2anaconda3'
+PREFIX_PLACEHOLDER = ('/opt/anaconda1anaconda2'
+ # this is intentiona... |
conda env export failure
Under conda 4.3.1, `conda env export` returns the backtrace:
```Python
Traceback (most recent call last):
File "/home/alan/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 515, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/h... | conda_env/env.py
<|code_start|>
from __future__ import absolute_import, print_function
import os
from collections import OrderedDict
from conda.base.context import context
from conda.cli import common # TODO: this should never have to import form conda.cli
from conda.core.linked_data import linked
from copy import co... | conda_env/env.py
from __future__ import absolute_import, print_function
import os
from collections import OrderedDict
from conda.base.context import context
from conda.cli import common # TODO: this should never have to import form conda.cli
from conda.core.linked_data import linked
from copy import copy
from itertoo... | conda_env/env.py
--- a/conda_env/env.py
+++ b/conda_env/env.py
@@ -36,10 +36,9 @@ def from_environment(name, prefix, no_builds=False, ignore_channels=False):
name: The name of environment
prefix: The path of prefix
no_builds: Whether has build requirement
- ignore_channels: whether ing... |
non json output on root clone
I understand that cloning root env is probably a not very good idea... but even then with the json flag, we get this non json output
```
$ conda create -n rootclone --clone root --json`
The following packages cannot be cloned out of the root environment:
- conda-build-2.0.2-py35_0
... | conda/misc.py
<|code_start|>
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import absolute_import, division, print_function, unicode_literals
from collections import defaultdict
import os
from os.path import (abspath, dirname, exists, expanduser, isdir... | conda/misc.py
# this module contains miscellaneous stuff which enventually could be moved
# into other places
from __future__ import absolute_import, division, print_function, unicode_literals
from collections import defaultdict
import os
from os.path import (abspath, dirname, exists, expanduser, isdir, isfile, islin... | conda/misc.py
--- a/conda/misc.py
+++ b/conda/misc.py
@@ -224,9 +224,10 @@ def clone_env(prefix1, prefix2, verbose=True, quiet=False, index_args=None):
if filter:
if not quiet:
- print('The following packages cannot be cloned out of the root environment:')
+ fh = sys.stderr if cont... |
Conda 4.3.4 seems to be broken
```
bag@bag ~ % conda --version
conda 4.3.4
bag@bag ~ % conda install -y --file https://raw.githubusercontent.com/bioconda/bioconda-utils/master/bioconda_utils/bioconda_utils-requirements.txt
CondaError: Downloaded bytes did not match Content-Length
url: https://raw.gith... | conda/gateways/download.py
<|code_start|>
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import hashlib
from logging import getLogger
from os.path import exists, basename
from threading import Lock
import warnings
from requests.exceptions import ConnectionEr... | conda/gateways/download.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import hashlib
from logging import getLogger
from os.path import exists, basename
from threading import Lock
import warnings
from requests.exceptions import ConnectionError, HTTPError,... | conda/gateways/download.py
--- a/conda/gateways/download.py
+++ b/conda/gateways/download.py
@@ -95,9 +95,10 @@ def download(url, target_full_path, md5sum):
Content-Length: %(content_length)d
downloaded bytes: %(downloaded_bytes)d
""")
- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.