after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def igetattr(self, name, context=None): if name == "im_func": return iter((self._proxied,)) return self._proxied.igetattr(name, context)
def igetattr(self, name, context=None): if name == "im_func": return iter((self._proxied,)) return super(UnboundMethod, self).igetattr(name, context)
https://github.com/PyCQA/astroid/issues/91
#!python Traceback (most recent call last): File "C:\Python34\Scripts\pylint-script.py", line 9, in <module> load_entry_point('pylint==1.4.3', 'console_scripts', 'pylint')() File "e:\projects\repos\pylint\pylint\__init__.py", line 23, in run_pylint Run(sys.argv[1:]) File "e:\projects\repos\pylint\pylint\lint.py", line 1343, in __init__ linter.check(args) File "e:\projects\repos\pylint\pylint\lint.py", line 754, in check self._do_check(files_or_modules) File "e:\projects\repos\pylint\pylint\lint.py", line 877, in _do_check self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers) File "e:\projects\repos\pylint\pylint\lint.py", line 958, in check_astroid_module walker.walk(ast_node) File "e:\projects\repos\pylint\pylint\utils.py", line 877, in walk self.walk(child) File "e:\projects\repos\pylint\pylint\utils.py", line 877, in walk self.walk(child) File "e:\projects\repos\pylint\pylint\utils.py", line 877, in walk self.walk(child) File "e:\projects\repos\pylint\pylint\utils.py", line 877, in walk self.walk(child) File "e:\projects\repos\pylint\pylint\utils.py", line 874, in walk cb(astroid) File "e:\projects\repos\pylint\pylint\checkers\typecheck.py", line 652, in visit_with infered.getattr('__enter__') File "e:\projects\repos\astroid-1\astroid\bases.py", line 264, in getattr return super(UnboundMethod, self).getattr(name, context) AttributeError: 'super' object has no attribute 'getattr'
AttributeError
def from_file(filename): url_scheme = filename.split("://", 1)[0] if url_scheme in CONDA_SESSION_SCHEMES: yamlstr = download_text(filename) elif not os.path.exists(filename): raise exceptions.EnvironmentFileNotFound(filename) else: with open(filename, "rb") as fp: yamlb = fp.read() try: yamlstr = yamlb.decode("utf-8") except UnicodeDecodeError: yamlstr = yamlb.decode("utf-16") return from_yaml(yamlstr, filename=filename)
def from_file(filename): url_scheme = filename.split("://", 1)[0] if url_scheme in CONDA_SESSION_SCHEMES: yamlstr = download_text(filename) elif not os.path.exists(filename): raise exceptions.EnvironmentFileNotFound(filename) else: with open(filename, "r") as fp: yamlstr = fp.read() return from_yaml(yamlstr, filename=filename)
https://github.com/conda/conda/issues/9749
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 3 # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "D:\Program_Files\miniconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__ return func(*args, **kwargs) File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\cli\main.py", line 80, in do_call exit_code = getattr(module, func_name)(args, parser) File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\cli\main_create.py", line 80, in execute directory=os.getcwd()) File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\specs\__init__.py", line 40, in detect if spec.can_handle(): File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\specs\yaml_file.py", line 18, in can_handle self._environment = env.from_file(self.filename) File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\env.py", line 151, in from_file return from_yaml(yamlstr, filename=filename) File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\env.py", line 136, in from_yaml data = yaml_load_standard(yamlstr) File "D:\Program_Files\miniconda3\lib\site-packages\conda\common\serialize.py", line 76, in yaml_load_standard return yaml.load(string, Loader=yaml.Loader, version="1.2") File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\main.py", line 933, in load loader = Loader(stream, version, preserve_quotes=preserve_quotes) File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\loader.py", line 50, in __init__ Reader.__init__(self, stream, loader=self) File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 85, in __init__ self.stream = stream # type: Any # as .read is called File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 117, in stream self.check_printable(val) File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 255, in check_printable 'special characters are not allowed', ruamel_yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed in "<unicode string>", position 3 `$ D:\Program_Files\miniconda3\Scripts\conda-env-script.py create -v -v -v -f .\environment.yml` environment variables: CIO_TEST=<not set> CONDA_AUTO_UPDATE_CONDA=false CONDA_DEFAULT_ENV=base CONDA_EXE=D:\Program_Files\miniconda3\Scripts\conda.exe CONDA_PREFIX=D:\Program_Files\miniconda3 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=D:\Program_Files\miniconda3\python.exe CONDA_ROOT=D:\Program_Files\miniconda3 CONDA_SHLVL=1 HOMEPATH=\ PATH=D:\Program_Files\miniconda3;D:\Program_Files\miniconda3\Library\mingw- w64\bin;D:\Program_Files\miniconda3\Library\usr\bin;D:\Program_Files\m iniconda3\Library\bin;D:\Program_Files\miniconda3\Scripts;D:\Program_F iles\miniconda3\bin;D:\Program_Files\miniconda3;D:\Program_Files\minic onda3\Library\mingw-w64\bin;D:\Program_Files\miniconda3\Library\usr\bi n;D:\Program_Files\miniconda3\Library\bin;D:\Program_Files\miniconda3\ Scripts;D:\Program_Files\miniconda3\bin;D:\Program_Files\miniconda3\co ndabin;C:\Oracle11\Ora11G-64\11.2.0\client_1\bin;C:\Oracle\ORA11\11.2. 0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDO WS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Prog ram Files (x86)\WebEx\Productivity Tools;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\ArcGIS\Bin;C:\Program Files (x86)\ArcGIS\EsriProductionMapping\Desktop10.5\Bin;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Webe x\Webex\Applications;C:\Users\avitale\AppData\Local\Microsoft\WindowsA pps;C:\Users\avitale\AppData\Local\Programs\Microsoft VS Code\bin;C:\U sers\avitale\AppData\Roaming\npm;C:\Python3X;C:\OSGeo4W\bin;C:\Python3 X;C:\OSGeo4W\bin;C:\Python3X;C:\OSGeo4W\bin;C:\OSGeo4W\bin;C:\Program Files\dotnet;C:\Users\avitale\AppData\Local\Microsoft\WindowsApps;.;C: \Users\avitale\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\a vitale\AppData\Roaming\npm;C:\Users\avitale\.dotnet\tools PSMODULEPATH=C:\Users\avitale\Documents\WindowsPowerShell\Modules;C:\Program Files\ WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\M odules REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : base active env location : D:\Program_Files\miniconda3 shell level : 1 user config file : C:\Users\avitale\.condarc populated config files : C:\Users\avitale\.condarc conda version : 4.8.2 conda-build version : not installed python version : 3.7.4.final.0 virtual packages : __cuda=10.2 base environment : D:\Program_Files\miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : D:\Program_Files\miniconda3\pkgs C:\Users\avitale\.conda\pkgs C:\Users\avitale\AppData\Local\conda\conda\pkgs envs directories : D:\Program_Files\miniconda3\envs C:\Users\avitale\.conda\envs C:\Users\avitale\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.17134 administrator : False netrc file : None offline mode : False An unexpected error has occurred. Conda has prepared the above report. If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: No report sent. To permanently opt-out, use $ conda config --set report_errors false
ruamel_yaml.reader.ReaderError
def configure_parser(sub_parsers): config_parser = sub_parsers.add_parser( "config", formatter_class=RawDescriptionHelpFormatter, description=config_description, help=config_description, epilog=config_example, ) config_parser.set_defaults(func=".main_config.execute") config_subparser = config_parser.add_subparsers() configure_vars_parser(config_subparser)
def configure_parser(sub_parsers): config_parser = sub_parsers.add_parser( "config", formatter_class=RawDescriptionHelpFormatter, description=config_description, help=config_description, epilog=config_example, ) config_subparser = config_parser.add_subparsers() configure_vars_parser(config_subparser)
https://github.com/conda/conda/issues/9625
Traceback (most recent call last): File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1078, in __call__ return func(*args, **kwargs) File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 76, in do_call relative_mod, func_name = args.func.rsplit('.', 1) AttributeError: 'Namespace' object has no attribute 'func'
AttributeError
def from_dist_str(cls, dist_str): parts = {} if dist_str[-len(CONDA_PACKAGE_EXTENSION_V2) :] == CONDA_PACKAGE_EXTENSION_V2: dist_str = dist_str[: -len(CONDA_PACKAGE_EXTENSION_V2)] elif dist_str[-len(CONDA_PACKAGE_EXTENSION_V1) :] == CONDA_PACKAGE_EXTENSION_V1: dist_str = dist_str[: -len(CONDA_PACKAGE_EXTENSION_V1)] if "::" in dist_str: channel_subdir_str, dist_str = dist_str.split("::", 1) if "/" in channel_subdir_str: channel_str, subdir = channel_subdir_str.rsplit("/", 1) if subdir not in context.known_subdirs: channel_str = channel_subdir_str subdir = None parts["channel"] = channel_str if subdir: parts["subdir"] = subdir else: parts["channel"] = channel_subdir_str name, version, build = dist_str.rsplit("-", 2) parts.update( { "name": name, "version": version, "build": build, } ) return cls(**parts)
def from_dist_str(cls, dist_str): parts = {} if dist_str.endswith(CONDA_PACKAGE_EXTENSION_V1): dist_str = dist_str[: -len(CONDA_PACKAGE_EXTENSION_V1)] if "::" in dist_str: channel_subdir_str, dist_str = dist_str.split("::", 1) if "/" in channel_subdir_str: channel_str, subdir = channel_subdir_str.split("/", 2) parts.update( { "channel": channel_str, "subdir": subdir, } ) else: parts["channel"] = channel_subdir_str name, version, build = dist_str.rsplit("-", 2) parts.update( { "name": name, "version": version, "build": build, } ) return cls(**parts)
https://github.com/conda/conda/issues/9814
Traceback (most recent call last): File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1079, in __call__ return func(*args, **kwargs) File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main exit_code = do_call(args, p) File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call return getattr(module, func_name)(args, parser) File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 20, in execute install(args, parser, 'install') File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 250, in install index) File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/plan.py", line 289, in revert_actions target_state = {MatchSpec.from_dist_str(dist_str) for dist_str in h.get_state(revision)} File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/plan.py", line 289, in <setcomp> target_state = {MatchSpec.from_dist_str(dist_str) for dist_str in h.get_state(revision)} File "/Users/christian/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 186, in from_dist_str channel_str, subdir = channel_subdir_str.split('/', 2) ValueError: too many values to unpack (expected 2)
ValueError
def get_paths(self): """ Read the list of installed paths from record or source file. Example ------- [(u'skdata/__init__.py', u'sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU', 0), (u'skdata/diabetes.py', None, None), ... ] """ manifest_full_path = self.manifest_full_path if manifest_full_path: python_version = self.python_version sp_dir = get_python_site_packages_short_path(python_version) + "/" prepend_metadata_dirname = basename(manifest_full_path) == "installed-files.txt" if prepend_metadata_dirname: path_prepender = basename(dirname(manifest_full_path)) + "/" else: path_prepender = "" def process_csv_row(reader): seen = [] records = [] for row in reader: cleaned_path = posix_normpath( "%s%s%s" % (sp_dir, path_prepender, row[0]) ) if len(row) == 3: checksum, size = row[1:] if checksum: assert checksum.startswith("sha256="), ( self._metadata_dir_full_path, cleaned_path, checksum, ) checksum = checksum[7:] else: checksum = None size = int(size) if size else None else: checksum = size = None if cleaned_path not in seen and row[0]: seen.append(cleaned_path) records.append((cleaned_path, checksum, size)) else: continue return tuple(records) csv_delimiter = "," if PY2: csv_delimiter = csv_delimiter.encode("utf-8") with open(manifest_full_path) as csvfile: record_reader = csv_reader(csvfile, delimiter=csv_delimiter) # format of each record is (path, checksum, size) records = process_csv_row(record_reader) files_set = set(record[0] for record in records) _pyc_path, _py_file_re = pyc_path, PY_FILE_RE py_ver_mm = get_major_minor_version(python_version, with_dot=False) missing_pyc_files = ( ff for ff in ( _pyc_path(f, py_ver_mm) for f in files_set if _py_file_re.match(f) ) if ff not in files_set ) records = sorted( concatv(records, ((pf, None, None) for pf in missing_pyc_files)) ) return records return []
def get_paths(self): """ Read the list of installed paths from record or source file. Example ------- [(u'skdata/__init__.py', u'sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU', 0), (u'skdata/diabetes.py', None, None), ... ] """ manifest_full_path = self.manifest_full_path if manifest_full_path: python_version = self.python_version sp_dir = get_python_site_packages_short_path(python_version) + "/" prepend_metadata_dirname = basename(manifest_full_path) == "installed-files.txt" if prepend_metadata_dirname: path_prepender = basename(dirname(manifest_full_path)) + "/" else: path_prepender = "" def process_csv_row(row): cleaned_path = posix_normpath("%s%s%s" % (sp_dir, path_prepender, row[0])) if len(row) == 3: checksum, size = row[1:] if checksum: assert checksum.startswith("sha256="), ( self._metadata_dir_full_path, cleaned_path, checksum, ) checksum = checksum[7:] else: checksum = None size = int(size) if size else None else: checksum = size = None return cleaned_path, checksum, size csv_delimiter = "," if PY2: csv_delimiter = csv_delimiter.encode("utf-8") with open(manifest_full_path) as csvfile: record_reader = csv_reader(csvfile, delimiter=csv_delimiter) # format of each record is (path, checksum, size) records = tuple(process_csv_row(row) for row in record_reader if row[0]) files_set = set(record[0] for record in records) _pyc_path, _py_file_re = pyc_path, PY_FILE_RE py_ver_mm = get_major_minor_version(python_version, with_dot=False) missing_pyc_files = ( ff for ff in ( _pyc_path(f, py_ver_mm) for f in files_set if _py_file_re.match(f) ) if ff not in files_set ) records = sorted( concatv(records, ((pf, None, None) for pf in missing_pyc_files)) ) return records return []
https://github.com/conda/conda/issues/9104
conda create --yes -n py-3.7 python==3.7 conda activate py-3.7 pip install jeepney==0.4.1 conda list # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/bago/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1003, in __call__ return func(*args, **kwargs) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main exit_code = do_call(args, p) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 142, in execute show_channel_urls=context.show_channel_urls) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 80, in print_packages show_channel_urls=show_channel_urls) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 45, in list_packages installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(), File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 117, in iter_records return itervalues(self._prefix_records) File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 146, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 70, in load self._load_site_packages() File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 261, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "/home/bago/conda/lib/python3.7/site-packages/conda/gateways/disk/read.py", line 253, in read_python_record paths_tups = pydist.get_paths() File "/home/bago/conda/lib/python3.7/site-packages/conda/common/pkg_formats/python.py", line 268, in get_paths records = sorted(concatv(records, ((pf, None, None) for pf in missing_pyc_files))) TypeError: '<' not supported between instances of 'NoneType' and 'str' `$ /home/bago/conda/bin/conda list`
TypeError
def process_csv_row(reader): seen = [] records = [] for row in reader: cleaned_path = posix_normpath("%s%s%s" % (sp_dir, path_prepender, row[0])) if len(row) == 3: checksum, size = row[1:] if checksum: assert checksum.startswith("sha256="), ( self._metadata_dir_full_path, cleaned_path, checksum, ) checksum = checksum[7:] else: checksum = None size = int(size) if size else None else: checksum = size = None if cleaned_path not in seen and row[0]: seen.append(cleaned_path) records.append((cleaned_path, checksum, size)) else: continue return tuple(records)
def process_csv_row(row): cleaned_path = posix_normpath("%s%s%s" % (sp_dir, path_prepender, row[0])) if len(row) == 3: checksum, size = row[1:] if checksum: assert checksum.startswith("sha256="), ( self._metadata_dir_full_path, cleaned_path, checksum, ) checksum = checksum[7:] else: checksum = None size = int(size) if size else None else: checksum = size = None return cleaned_path, checksum, size
https://github.com/conda/conda/issues/9104
conda create --yes -n py-3.7 python==3.7 conda activate py-3.7 pip install jeepney==0.4.1 conda list # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/bago/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1003, in __call__ return func(*args, **kwargs) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main exit_code = do_call(args, p) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 142, in execute show_channel_urls=context.show_channel_urls) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 80, in print_packages show_channel_urls=show_channel_urls) File "/home/bago/conda/lib/python3.7/site-packages/conda/cli/main_list.py", line 45, in list_packages installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(), File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 117, in iter_records return itervalues(self._prefix_records) File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 146, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 70, in load self._load_site_packages() File "/home/bago/conda/lib/python3.7/site-packages/conda/core/prefix_data.py", line 261, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "/home/bago/conda/lib/python3.7/site-packages/conda/gateways/disk/read.py", line 253, in read_python_record paths_tups = pydist.get_paths() File "/home/bago/conda/lib/python3.7/site-packages/conda/common/pkg_formats/python.py", line 268, in get_paths records = sorted(concatv(records, ((pf, None, None) for pf in missing_pyc_files))) TypeError: '<' not supported between instances of 'NoneType' and 'str' `$ /home/bago/conda/bin/conda list`
TypeError
def typify(value, type_hint=None): """Take a primitive value, usually a string, and try to make a more relevant type out of it. An optional type_hint will try to coerce the value to that type. Args: value (Any): Usually a string, not a sequence type_hint (type or Tuple[type]): Examples: >>> typify('32') 32 >>> typify('32', float) 32.0 >>> typify('32.0') 32.0 >>> typify('32.0.0') '32.0.0' >>> [typify(x) for x in ('true', 'yes', 'on')] [True, True, True] >>> [typify(x) for x in ('no', 'FALSe', 'off')] [False, False, False] >>> [typify(x) for x in ('none', 'None', None)] [None, None, None] """ # value must be a string, or there at least needs to be a type hint if isinstance(value, string_types): value = value.strip() elif type_hint is None: # can't do anything because value isn't a string and there's no type hint return value # now we either have a stripped string, a type hint, or both # use the hint if it exists if isiterable(type_hint): if isinstance(type_hint, type) and issubclass(type_hint, Enum): try: return type_hint(value) except ValueError as e: try: return type_hint[value] except KeyError: raise TypeCoercionError(value, text_type(e)) type_hint = set(type_hint) if not (type_hint - NUMBER_TYPES_SET): return numberify(value) elif not (type_hint - STRING_TYPES_SET): return text_type(value) elif not (type_hint - {bool, NoneType}): return boolify(value, nullable=True) elif not (type_hint - (STRING_TYPES_SET | {bool})): return boolify(value, return_string=True) elif not (type_hint - (STRING_TYPES_SET | {NoneType})): value = text_type(value) return None if value.lower() == "none" else value elif not (type_hint - {bool, int}): return typify_str_no_hint(text_type(value)) else: raise NotImplementedError() elif type_hint is not None: # coerce using the type hint, or use boolify for bool try: return boolify(value) if type_hint == bool else type_hint(value) except ValueError as e: # ValueError: invalid literal for int() with base 10: 'nope' raise TypeCoercionError(value, text_type(e)) else: # no type hint, but we know value is a string, so try to match with the regex patterns # if there's still no match, `typify_str_no_hint` will return `value` return typify_str_no_hint(value)
def typify(value, type_hint=None): """Take a primitive value, usually a string, and try to make a more relevant type out of it. An optional type_hint will try to coerce the value to that type. Args: value (Any): Usually a string, not a sequence type_hint (type or Tuple[type]): Examples: >>> typify('32') 32 >>> typify('32', float) 32.0 >>> typify('32.0') 32.0 >>> typify('32.0.0') '32.0.0' >>> [typify(x) for x in ('true', 'yes', 'on')] [True, True, True] >>> [typify(x) for x in ('no', 'FALSe', 'off')] [False, False, False] >>> [typify(x) for x in ('none', 'None', None)] [None, None, None] """ # value must be a string, or there at least needs to be a type hint if isinstance(value, string_types): value = value.strip() elif type_hint is None: # can't do anything because value isn't a string and there's no type hint return value # now we either have a stripped string, a type hint, or both # use the hint if it exists if isiterable(type_hint): if isinstance(type_hint, type) and issubclass(type_hint, Enum): try: return type_hint(value) except ValueError: return type_hint[value] type_hint = set(type_hint) if not (type_hint - NUMBER_TYPES_SET): return numberify(value) elif not (type_hint - STRING_TYPES_SET): return text_type(value) elif not (type_hint - {bool, NoneType}): return boolify(value, nullable=True) elif not (type_hint - (STRING_TYPES_SET | {bool})): return boolify(value, return_string=True) elif not (type_hint - (STRING_TYPES_SET | {NoneType})): value = text_type(value) return None if value.lower() == "none" else value elif not (type_hint - {bool, int}): return typify_str_no_hint(text_type(value)) else: raise NotImplementedError() elif type_hint is not None: # coerce using the type hint, or use boolify for bool try: return boolify(value) if type_hint == bool else type_hint(value) except ValueError as e: # ValueError: invalid literal for int() with base 10: 'nope' raise TypeCoercionError(value, text_type(e)) else: # no type hint, but we know value is a string, so try to match with the regex patterns # if there's still no match, `typify_str_no_hint` will return `value` return typify_str_no_hint(value)
https://github.com/conda/conda/issues/8176
error: RuntimeError('Could not run any SAT solver.') command: C:\Tools\Progs\python\anaconda3\scripts\conda-script.py install -p C:\Tools\Progs\python\anaconda3 -y anaconda-client==1.7.2 user_agent: conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.15063 _messageid: -9223372036617369659 _messagetime: 1548779675918 / 2019-01-29 10:34:35 Traceback (most recent call last): File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main_install.py", line 21, in execute install(args, parser, 'install') File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff force_remove) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 240, in solve_final_state ssc = self._find_inconsistent_packages(ssc) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 342, in _find_inconsistent_packages _, inconsistent_precs = ssc.r.bad_installed(ssc.solution_precs, ()) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 896, in bad_installed C = r2.gen_clauses() File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\io.py", line 85, in decorated return f(*args, **kwds) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 668, in gen_clauses C = Clauses(sat_solver_cls=get_sat_solver_cls(context.sat_solver)) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 56, in _memoized_func result = func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\logic.py", line 293, in get_sat_solver_cls raise RuntimeError('Could not run any SAT solver.') RuntimeError: Could not run any SAT solver.
RuntimeError
def category_map(self): return odict( ( ( "Channel Configuration", ( "channels", "channel_alias", "default_channels", "override_channels_enabled", "whitelist_channels", "custom_channels", "custom_multichannels", "migrated_channel_aliases", "migrated_custom_channels", "add_anaconda_token", "allow_non_channel_urls", ), ), ( "Basic Conda Configuration", ( # TODO: Is there a better category name here? "envs_dirs", "pkgs_dirs", ), ), ( "Network Configuration", ( "client_ssl_cert", "client_ssl_cert_key", "local_repodata_ttl", "offline", "proxy_servers", "remote_connect_timeout_secs", "remote_max_retries", "remote_read_timeout_secs", "ssl_verify", ), ), ( "Solver Configuration", ( "aggressive_update_packages", "auto_update_conda", "channel_priority", "create_default_packages", "disallowed_packages", "force_reinstall", "pinned_packages", "pip_interop_enabled", "prune", "track_features", ), ), ( "Package Linking and Install-time Configuration", ( "allow_softlinks", "always_copy", "always_softlink", "path_conflict", "rollback_enabled", "safety_checks", "extra_safety_checks", "shortcuts", "non_admin_enabled", ), ), ( "Conda-build Configuration", ( "bld_path", "croot", "anaconda_upload", "conda_build", ), ), ( "Output, Prompt, and Flow Control Configuration", ( "always_yes", "auto_activate_base", "changeps1", "env_prompt", "json", "notify_outdated_conda", "quiet", "report_errors", "show_channel_urls", "verbosity", ), ), ( "CLI-only", ( "deps_modifier", "update_modifier", "force", "force_remove", "clobber", "dry_run", "download_only", "ignore_pinned", "use_index_cache", "use_local", ), ), ( "Hidden and Undocumented", ( "allow_cycles", # allow cyclical dependencies, or raise "allow_conda_downgrades", "add_pip_as_python_dependency", "debug", "default_python", "enable_private_envs", "error_upload_url", # should remain undocumented "featureless_minimization_disabled_feature_flag", "force_32bit", "root_prefix", "sat_solver", "solver_ignore_timestamps", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA ), ), ) )
def category_map(self): return odict( ( ( "Channel Configuration", ( "channels", "channel_alias", "default_channels", "override_channels_enabled", "whitelist_channels", "custom_channels", "custom_multichannels", "migrated_channel_aliases", "migrated_custom_channels", "add_anaconda_token", "allow_non_channel_urls", ), ), ( "Basic Conda Configuration", ( # TODO: Is there a better category name here? "env_prompt", "envs_dirs", "pkgs_dirs", ), ), ( "Network Configuration", ( "client_ssl_cert", "client_ssl_cert_key", "local_repodata_ttl", "offline", "proxy_servers", "remote_connect_timeout_secs", "remote_max_retries", "remote_read_timeout_secs", "ssl_verify", ), ), ( "Solver Configuration", ( "aggressive_update_packages", "auto_update_conda", "channel_priority", "create_default_packages", "disallowed_packages", "force_reinstall", "pinned_packages", "pip_interop_enabled", "prune", "track_features", ), ), ( "Package Linking and Install-time Configuration", ( "allow_softlinks", "always_copy", "always_softlink", "path_conflict", "rollback_enabled", "safety_checks", "extra_safety_checks", "shortcuts", "non_admin_enabled", ), ), ( "Conda-build Configuration", ( "bld_path", "croot", "anaconda_upload", "conda_build", ), ), ( "Output, Prompt, and Flow Control Configuration", ( "always_yes", "auto_activate_base", "changeps1", "json", "notify_outdated_conda", "quiet", "report_errors", "show_channel_urls", "verbosity", ), ), ( "CLI-only", ( "deps_modifier", "update_modifier", "force", "force_remove", "clobber", "dry_run", "download_only", "ignore_pinned", "use_index_cache", "use_local", ), ), ( "Hidden and Undocumented", ( "allow_cycles", # allow cyclical dependencies, or raise "allow_conda_downgrades", "add_pip_as_python_dependency", "debug", "default_python", "enable_private_envs", "error_upload_url", # should remain undocumented "featureless_minimization_disabled_feature_flag", "force_32bit", "root_prefix", "sat_solver", "solver_ignore_timestamps", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA ), ), ) )
https://github.com/conda/conda/issues/8176
error: RuntimeError('Could not run any SAT solver.') command: C:\Tools\Progs\python\anaconda3\scripts\conda-script.py install -p C:\Tools\Progs\python\anaconda3 -y anaconda-client==1.7.2 user_agent: conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.15063 _messageid: -9223372036617369659 _messagetime: 1548779675918 / 2019-01-29 10:34:35 Traceback (most recent call last): File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main_install.py", line 21, in execute install(args, parser, 'install') File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff force_remove) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 240, in solve_final_state ssc = self._find_inconsistent_packages(ssc) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 342, in _find_inconsistent_packages _, inconsistent_precs = ssc.r.bad_installed(ssc.solution_precs, ()) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 896, in bad_installed C = r2.gen_clauses() File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\io.py", line 85, in decorated return f(*args, **kwds) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 668, in gen_clauses C = Clauses(sat_solver_cls=get_sat_solver_cls(context.sat_solver)) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 56, in _memoized_func result = func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\logic.py", line 293, in get_sat_solver_cls raise RuntimeError('Could not run any SAT solver.') RuntimeError: Could not run any SAT solver.
RuntimeError
def execute_config(args, parser): stdout_write = getLogger("conda.stdout").info stderr_write = getLogger("conda.stderr").info json_warnings = [] json_get = {} if args.show_sources: if context.json: stdout_write( json.dumps( context.collect_all(), sort_keys=True, indent=2, separators=(",", ": "), ) ) else: lines = [] for source, reprs in iteritems(context.collect_all()): lines.append("==> %s <==" % source) lines.extend(format_dict(reprs)) lines.append("") stdout_write("\n".join(lines)) return if args.show is not None: if args.show: paramater_names = args.show all_names = context.list_parameters() not_params = set(paramater_names) - set(all_names) if not_params: from ..exceptions import ArgumentError from ..common.io import dashlist raise ArgumentError( "Invalid configuration parameters: %s" % dashlist(not_params) ) else: paramater_names = context.list_parameters() d = OrderedDict((key, getattr(context, key)) for key in paramater_names) if context.json: stdout_write( json.dumps( d, sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: # Add in custom formatting if "custom_channels" in d: d["custom_channels"] = { channel.name: "%s://%s" % (channel.scheme, channel.location) for channel in itervalues(d["custom_channels"]) } if "custom_multichannels" in d: from ..common.io import dashlist d["custom_multichannels"] = { multichannel_name: dashlist(channels, indent=4) for multichannel_name, channels in iteritems( d["custom_multichannels"] ) } stdout_write("\n".join(format_dict(d))) context.validate_configuration() return if args.describe is not None: if args.describe: paramater_names = args.describe all_names = context.list_parameters() not_params = set(paramater_names) - set(all_names) if not_params: from ..exceptions import ArgumentError from ..common.io import dashlist raise ArgumentError( "Invalid configuration parameters: %s" % dashlist(not_params) ) if context.json: stdout_write( json.dumps( [context.describe_parameter(name) for name in paramater_names], sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: builder = [] builder.extend( concat( parameter_description_builder(name) for name in paramater_names ) ) stdout_write("\n".join(builder)) else: if context.json: skip_categories = ("CLI-only", "Hidden and Undocumented") paramater_names = sorted( concat( parameter_names for category, parameter_names in context.category_map.items() if category not in skip_categories ) ) stdout_write( json.dumps( [context.describe_parameter(name) for name in paramater_names], sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: stdout_write(describe_all_parameters()) return if args.validate: context.validate_all() return if args.system: rc_path = sys_rc_path elif args.env: if "CONDA_PREFIX" in os.environ: rc_path = join(os.environ["CONDA_PREFIX"], ".condarc") else: rc_path = user_rc_path elif args.file: rc_path = args.file else: rc_path = user_rc_path if args.write_default: if isfile(rc_path): with open(rc_path) as fh: data = fh.read().strip() if data: raise CondaError( "The file '%s' " "already contains configuration information.\n" "Remove the file to proceed.\n" "Use `conda config --describe` to display default configuration." % rc_path ) with open(rc_path, "w") as fh: fh.write(describe_all_parameters()) return # read existing condarc if os.path.exists(rc_path): with open(rc_path, "r") as fh: rc_config = yaml_load(fh) or {} else: rc_config = {} grouped_paramaters = groupby( lambda p: context.describe_parameter(p)["parameter_type"], context.list_parameters(), ) primitive_parameters = grouped_paramaters["primitive"] sequence_parameters = grouped_paramaters["sequence"] map_parameters = grouped_paramaters["map"] # Get if args.get is not None: context.validate_all() if args.get == []: args.get = sorted(rc_config.keys()) for key in args.get: if key not in primitive_parameters + sequence_parameters: message = "unknown key %s" % key if not context.json: stderr_write(message) else: json_warnings.append(message) continue if key not in rc_config: continue if context.json: json_get[key] = rc_config[key] continue if isinstance(rc_config[key], (bool, string_types)): stdout_write(" ".join(("--set", key, text_type(rc_config[key])))) else: # assume the key is a list-type # Note, since conda config --add prepends, these are printed in # the reverse order so that entering them in this order will # recreate the same file items = rc_config.get(key, []) numitems = len(items) for q, item in enumerate(reversed(items)): # Use repr so that it can be pasted back in to conda config --add if key == "channels" and q in (0, numitems - 1): stdout_write( " ".join( ( "--add", key, repr(item), " # lowest priority" if q == 0 else " # highest priority", ) ) ) else: stdout_write(" ".join(("--add", key, repr(item)))) if args.stdin: content = timeout(5, sys.stdin.read) if not content: return try: parsed = yaml_load(content) rc_config.update(parsed) except Exception: # pragma: no cover from ..exceptions import ParseError raise ParseError("invalid yaml content:\n%s" % content) # prepend, append, add for arg, prepend in zip((args.prepend, args.append), (True, False)): for key, item in arg: if key == "channels" and key not in rc_config: rc_config[key] = ["defaults"] if key not in sequence_parameters: from ..exceptions import CondaValueError raise CondaValueError( "Key '%s' is not a known sequence parameter." % key ) if not ( isinstance(rc_config.get(key, []), Sequence) and not isinstance(rc_config.get(key, []), string_types) ): from ..exceptions import CouldntParseError bad = rc_config[key].__class__.__name__ raise CouldntParseError("key %r should be a list, not %s." % (key, bad)) arglist = rc_config.setdefault(key, []) if item in arglist: # Right now, all list keys should not contain duplicates message = "Warning: '%s' already in '%s' list, moving to the %s" % ( item, key, "top" if prepend else "bottom", ) arglist = rc_config[key] = [p for p in arglist if p != item] if not context.json: stderr_write(message) else: json_warnings.append(message) arglist.insert(0 if prepend else len(arglist), item) # Set for key, item in args.set: key, subkey = key.split(".", 1) if "." in key else (key, None) if key in primitive_parameters: value = context.typify_parameter(key, item) rc_config[key] = value elif key in map_parameters: argmap = rc_config.setdefault(key, {}) argmap[subkey] = item else: from ..exceptions import CondaValueError raise CondaValueError("Key '%s' is not a known primitive parameter." % key) # Remove for key, item in args.remove: key, subkey = key.split(".", 1) if "." in key else (key, None) if key not in rc_config: if key != "channels": from ..exceptions import CondaKeyError raise CondaKeyError(key, "key %r is not in the config file" % key) rc_config[key] = ["defaults"] if item not in rc_config[key]: from ..exceptions import CondaKeyError raise CondaKeyError( key, "%r is not in the %r key of the config file" % (item, key) ) rc_config[key] = [i for i in rc_config[key] if i != item] # Remove Key for (key,) in args.remove_key: key, subkey = key.split(".", 1) if "." in key else (key, None) if key not in rc_config: from ..exceptions import CondaKeyError raise CondaKeyError(key, "key %r is not in the config file" % key) del rc_config[key] # config.rc_keys if not args.get: # Add representers for enums. # Because a representer cannot be added for the base Enum class (it must be added for # each specific Enum subclass), and because of import rules), I don't know of a better # location to do this. def enum_representer(dumper, data): return dumper.represent_str(str(data)) yaml.representer.RoundTripRepresenter.add_representer( SafetyChecks, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( PathConflict, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( DepsModifier, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( UpdateModifier, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( ChannelPriority, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( SatSolverChoice, enum_representer ) try: with open(rc_path, "w") as rc: rc.write(yaml_dump(rc_config)) except (IOError, OSError) as e: raise CondaError( "Cannot write to condarc file at %s\nCaused by %r" % (rc_path, e) ) if context.json: from .common import stdout_json_success stdout_json_success(rc_path=rc_path, warnings=json_warnings, get=json_get) return
def execute_config(args, parser): stdout_write = getLogger("conda.stdout").info stderr_write = getLogger("conda.stderr").info json_warnings = [] json_get = {} if args.show_sources: if context.json: stdout_write( json.dumps( context.collect_all(), sort_keys=True, indent=2, separators=(",", ": "), ) ) else: lines = [] for source, reprs in iteritems(context.collect_all()): lines.append("==> %s <==" % source) lines.extend(format_dict(reprs)) lines.append("") stdout_write("\n".join(lines)) return if args.show is not None: if args.show: paramater_names = args.show all_names = context.list_parameters() not_params = set(paramater_names) - set(all_names) if not_params: from ..exceptions import ArgumentError from ..common.io import dashlist raise ArgumentError( "Invalid configuration parameters: %s" % dashlist(not_params) ) else: paramater_names = context.list_parameters() d = OrderedDict((key, getattr(context, key)) for key in paramater_names) if context.json: stdout_write( json.dumps( d, sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: # Add in custom formatting if "custom_channels" in d: d["custom_channels"] = { channel.name: "%s://%s" % (channel.scheme, channel.location) for channel in itervalues(d["custom_channels"]) } if "custom_multichannels" in d: from ..common.io import dashlist d["custom_multichannels"] = { multichannel_name: dashlist(channels, indent=4) for multichannel_name, channels in iteritems( d["custom_multichannels"] ) } stdout_write("\n".join(format_dict(d))) context.validate_configuration() return if args.describe is not None: if args.describe: paramater_names = args.describe all_names = context.list_parameters() not_params = set(paramater_names) - set(all_names) if not_params: from ..exceptions import ArgumentError from ..common.io import dashlist raise ArgumentError( "Invalid configuration parameters: %s" % dashlist(not_params) ) if context.json: stdout_write( json.dumps( [context.describe_parameter(name) for name in paramater_names], sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: builder = [] builder.extend( concat( parameter_description_builder(name) for name in paramater_names ) ) stdout_write("\n".join(builder)) else: if context.json: skip_categories = ("CLI-only", "Hidden and Undocumented") paramater_names = sorted( concat( parameter_names for category, parameter_names in context.category_map.items() if category not in skip_categories ) ) stdout_write( json.dumps( [context.describe_parameter(name) for name in paramater_names], sort_keys=True, indent=2, separators=(",", ": "), cls=EntityEncoder, ) ) else: stdout_write(describe_all_parameters()) return if args.validate: context.validate_all() return if args.system: rc_path = sys_rc_path elif args.env: if "CONDA_PREFIX" in os.environ: rc_path = join(os.environ["CONDA_PREFIX"], ".condarc") else: rc_path = user_rc_path elif args.file: rc_path = args.file else: rc_path = user_rc_path if args.write_default: if isfile(rc_path): with open(rc_path) as fh: data = fh.read().strip() if data: raise CondaError( "The file '%s' " "already contains configuration information.\n" "Remove the file to proceed.\n" "Use `conda config --describe` to display default configuration." % rc_path ) with open(rc_path, "w") as fh: fh.write(describe_all_parameters()) return # read existing condarc if os.path.exists(rc_path): with open(rc_path, "r") as fh: rc_config = yaml_load(fh) or {} else: rc_config = {} grouped_paramaters = groupby( lambda p: context.describe_parameter(p)["parameter_type"], context.list_parameters(), ) primitive_parameters = grouped_paramaters["primitive"] sequence_parameters = grouped_paramaters["sequence"] map_parameters = grouped_paramaters["map"] # Get if args.get is not None: context.validate_all() if args.get == []: args.get = sorted(rc_config.keys()) for key in args.get: if key not in primitive_parameters + sequence_parameters: message = "unknown key %s" % key if not context.json: stderr_write(message) else: json_warnings.append(message) continue if key not in rc_config: continue if context.json: json_get[key] = rc_config[key] continue if isinstance(rc_config[key], (bool, string_types)): stdout_write(" ".join(("--set", key, text_type(rc_config[key])))) else: # assume the key is a list-type # Note, since conda config --add prepends, these are printed in # the reverse order so that entering them in this order will # recreate the same file items = rc_config.get(key, []) numitems = len(items) for q, item in enumerate(reversed(items)): # Use repr so that it can be pasted back in to conda config --add if key == "channels" and q in (0, numitems - 1): stdout_write( " ".join( ( "--add", key, repr(item), " # lowest priority" if q == 0 else " # highest priority", ) ) ) else: stdout_write(" ".join(("--add", key, repr(item)))) if args.stdin: content = timeout(5, sys.stdin.read) if not content: return try: parsed = yaml_load(content) rc_config.update(parsed) except Exception: # pragma: no cover from ..exceptions import ParseError raise ParseError("invalid yaml content:\n%s" % content) # prepend, append, add for arg, prepend in zip((args.prepend, args.append), (True, False)): for key, item in arg: if key == "channels" and key not in rc_config: rc_config[key] = ["defaults"] if key not in sequence_parameters: from ..exceptions import CondaValueError raise CondaValueError( "Key '%s' is not a known sequence parameter." % key ) if not ( isinstance(rc_config.get(key, []), Sequence) and not isinstance(rc_config.get(key, []), string_types) ): from ..exceptions import CouldntParseError bad = rc_config[key].__class__.__name__ raise CouldntParseError("key %r should be a list, not %s." % (key, bad)) arglist = rc_config.setdefault(key, []) if item in arglist: # Right now, all list keys should not contain duplicates message = "Warning: '%s' already in '%s' list, moving to the %s" % ( item, key, "top" if prepend else "bottom", ) arglist = rc_config[key] = [p for p in arglist if p != item] if not context.json: stderr_write(message) else: json_warnings.append(message) arglist.insert(0 if prepend else len(arglist), item) # Set for key, item in args.set: key, subkey = key.split(".", 1) if "." in key else (key, None) if key in primitive_parameters: value = context.typify_parameter(key, item) rc_config[key] = value elif key in map_parameters: argmap = rc_config.setdefault(key, {}) argmap[subkey] = item else: from ..exceptions import CondaValueError raise CondaValueError("Key '%s' is not a known primitive parameter." % key) # Remove for key, item in args.remove: key, subkey = key.split(".", 1) if "." in key else (key, None) if key not in rc_config: if key != "channels": from ..exceptions import CondaKeyError raise CondaKeyError(key, "key %r is not in the config file" % key) rc_config[key] = ["defaults"] if item not in rc_config[key]: from ..exceptions import CondaKeyError raise CondaKeyError( key, "%r is not in the %r key of the config file" % (item, key) ) rc_config[key] = [i for i in rc_config[key] if i != item] # Remove Key for (key,) in args.remove_key: key, subkey = key.split(".", 1) if "." in key else (key, None) if key not in rc_config: from ..exceptions import CondaKeyError raise CondaKeyError(key, "key %r is not in the config file" % key) del rc_config[key] # config.rc_keys if not args.get: # Add representers for enums. # Because a representer cannot be added for the base Enum class (it must be added for # each specific Enum subclass), and because of import rules), I don't know of a better # location to do this. def enum_representer(dumper, data): return dumper.represent_str(str(data)) yaml.representer.RoundTripRepresenter.add_representer( SafetyChecks, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( PathConflict, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( DepsModifier, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( UpdateModifier, enum_representer ) yaml.representer.RoundTripRepresenter.add_representer( ChannelPriority, enum_representer ) try: with open(rc_path, "w") as rc: rc.write(yaml_dump(rc_config)) except (IOError, OSError) as e: raise CondaError( "Cannot write to condarc file at %s\nCaused by %r" % (rc_path, e) ) if context.json: from .common import stdout_json_success stdout_json_success(rc_path=rc_path, warnings=json_warnings, get=json_get) return
https://github.com/conda/conda/issues/8176
error: RuntimeError('Could not run any SAT solver.') command: C:\Tools\Progs\python\anaconda3\scripts\conda-script.py install -p C:\Tools\Progs\python\anaconda3 -y anaconda-client==1.7.2 user_agent: conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.15063 _messageid: -9223372036617369659 _messagetime: 1548779675918 / 2019-01-29 10:34:35 Traceback (most recent call last): File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main_install.py", line 21, in execute install(args, parser, 'install') File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff force_remove) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 240, in solve_final_state ssc = self._find_inconsistent_packages(ssc) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 342, in _find_inconsistent_packages _, inconsistent_precs = ssc.r.bad_installed(ssc.solution_precs, ()) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 896, in bad_installed C = r2.gen_clauses() File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\io.py", line 85, in decorated return f(*args, **kwds) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 668, in gen_clauses C = Clauses(sat_solver_cls=get_sat_solver_cls(context.sat_solver)) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 56, in _memoized_func result = func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\logic.py", line 293, in get_sat_solver_cls raise RuntimeError('Could not run any SAT solver.') RuntimeError: Could not run any SAT solver.
RuntimeError
def get_sat_solver_cls(sat_solver_choice=SatSolverChoice.PYCOSAT): solvers = odict( [ (SatSolverChoice.PYCOSAT, PycoSatSolver), (SatSolverChoice.PYCRYPTOSAT, CryptoMiniSatSolver), (SatSolverChoice.PYSAT, PySatSolver), ] ) cls = solvers[sat_solver_choice] try: cls().run(0) except Exception as e: log.warning( "Could not run SAT solver through interface '%s'.", sat_solver_choice ) log.debug("SAT interface error due to: %s", e, exc_info=True) else: log.debug("Using SAT solver interface '%s'.", sat_solver_choice) return cls for solver_choice, cls in solvers.items(): try: cls().run(0) except Exception as e: log.debug( "Attempted SAT interface '%s' but unavailable due to: %s", sat_solver_choice, e, ) else: log.debug("Falling back to SAT solver interface '%s'.", sat_solver_choice) return cls from ..exceptions import CondaDependencyError raise CondaDependencyError( "Cannot run solver. No functioning SAT implementations available." )
def get_sat_solver_cls(name=None): solvers = odict( [ ("pycosat", PycoSatSolver), ("pycryptosat", CryptoMiniSatSolver), ("pysat", PySatSolver), ] ) if name is not None: try: cls = solvers[name] except KeyError: raise ValueError('Unknown SAT solver interface: "{}".'.format(name)) try: cls().run(0) except Exception: raise RuntimeError( 'Could not run SAT solver through interface "{}".'.format(name) ) else: log.debug('Using SAT solver interface "{}".'.format(name)) return cls for name, cls in solvers.items(): try: cls().run(0) except Exception: log.warn('Could not run SAT solver through interface "{}".'.format(name)) else: log.debug('Using SAT solver interface "{}".'.format(name)) return cls raise RuntimeError("Could not run any SAT solver.")
https://github.com/conda/conda/issues/8176
error: RuntimeError('Could not run any SAT solver.') command: C:\Tools\Progs\python\anaconda3\scripts\conda-script.py install -p C:\Tools\Progs\python\anaconda3 -y anaconda-client==1.7.2 user_agent: conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.15063 _messageid: -9223372036617369659 _messagetime: 1548779675918 / 2019-01-29 10:34:35 Traceback (most recent call last): File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main_install.py", line 21, in execute install(args, parser, 'install') File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff force_remove) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 240, in solve_final_state ssc = self._find_inconsistent_packages(ssc) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 342, in _find_inconsistent_packages _, inconsistent_precs = ssc.r.bad_installed(ssc.solution_precs, ()) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 896, in bad_installed C = r2.gen_clauses() File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\io.py", line 85, in decorated return f(*args, **kwds) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 668, in gen_clauses C = Clauses(sat_solver_cls=get_sat_solver_cls(context.sat_solver)) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 56, in _memoized_func result = func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\logic.py", line 293, in get_sat_solver_cls raise RuntimeError('Could not run any SAT solver.') RuntimeError: Could not run any SAT solver.
RuntimeError
def category_map(self): return odict( ( ( "Channel Configuration", ( "channels", "channel_alias", "default_channels", "override_channels_enabled", "whitelist_channels", "custom_channels", "custom_multichannels", "migrated_channel_aliases", "migrated_custom_channels", "add_anaconda_token", "allow_non_channel_urls", ), ), ( "Basic Conda Configuration", ( # TODO: Is there a better category name here? "envs_dirs", "pkgs_dirs", ), ), ( "Network Configuration", ( "client_ssl_cert", "client_ssl_cert_key", "local_repodata_ttl", "offline", "proxy_servers", "remote_connect_timeout_secs", "remote_max_retries", "remote_read_timeout_secs", "ssl_verify", ), ), ( "Solver Configuration", ( "aggressive_update_packages", "auto_update_conda", "channel_priority", "create_default_packages", "disallowed_packages", "pinned_packages", "track_features", "prune", "force_reinstall", ), ), ( "Package Linking and Install-time Configuration", ( "allow_softlinks", "always_copy", "always_softlink", "path_conflict", "rollback_enabled", "safety_checks", "extra_safety_checks", "shortcuts", "non_admin_enabled", ), ), ( "Conda-build Configuration", ( "bld_path", "croot", "anaconda_upload", "conda_build", ), ), ( "Output, Prompt, and Flow Control Configuration", ( "always_yes", "auto_activate_base", "changeps1", "env_prompt", "json", "notify_outdated_conda", "quiet", "report_errors", "show_channel_urls", "verbosity", ), ), ( "CLI-only", ( "deps_modifier", "update_modifier", "force", "force_remove", "clobber", "dry_run", "download_only", "ignore_pinned", "use_index_cache", "use_local", ), ), ( "Hidden and Undocumented", ( "allow_cycles", # allow cyclical dependencies, or raise "allow_conda_downgrades", "add_pip_as_python_dependency", "debug", "default_python", "enable_private_envs", "error_upload_url", # should remain undocumented "featureless_minimization_disabled_feature_flag", "force_32bit", "pip_interop_enabled", # temporary feature flag "root_prefix", "sat_solver", "solver_ignore_timestamps", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA ), ), ) )
def category_map(self): return odict( ( ( "Channel Configuration", ( "channels", "channel_alias", "default_channels", "override_channels_enabled", "whitelist_channels", "custom_channels", "custom_multichannels", "migrated_channel_aliases", "migrated_custom_channels", "add_anaconda_token", "allow_non_channel_urls", ), ), ( "Basic Conda Configuration", ( # TODO: Is there a better category name here? "env_prompt", "envs_dirs", "pkgs_dirs", ), ), ( "Network Configuration", ( "client_ssl_cert", "client_ssl_cert_key", "local_repodata_ttl", "offline", "proxy_servers", "remote_connect_timeout_secs", "remote_max_retries", "remote_read_timeout_secs", "ssl_verify", ), ), ( "Solver Configuration", ( "aggressive_update_packages", "auto_update_conda", "channel_priority", "create_default_packages", "disallowed_packages", "pinned_packages", "track_features", "prune", "force_reinstall", ), ), ( "Package Linking and Install-time Configuration", ( "allow_softlinks", "always_copy", "always_softlink", "path_conflict", "rollback_enabled", "safety_checks", "extra_safety_checks", "shortcuts", "non_admin_enabled", ), ), ( "Conda-build Configuration", ( "bld_path", "croot", "anaconda_upload", "conda_build", ), ), ( "Output, Prompt, and Flow Control Configuration", ( "always_yes", "auto_activate_base", "changeps1", "json", "notify_outdated_conda", "quiet", "report_errors", "show_channel_urls", "verbosity", ), ), ( "CLI-only", ( "deps_modifier", "update_modifier", "force", "force_remove", "clobber", "dry_run", "download_only", "ignore_pinned", "use_index_cache", "use_local", ), ), ( "Hidden and Undocumented", ( "allow_cycles", # allow cyclical dependencies, or raise "allow_conda_downgrades", "add_pip_as_python_dependency", "debug", "default_python", "enable_private_envs", "error_upload_url", # should remain undocumented "featureless_minimization_disabled_feature_flag", "force_32bit", "pip_interop_enabled", # temporary feature flag "root_prefix", "sat_solver", "solver_ignore_timestamps", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA ), ), ) )
https://github.com/conda/conda/issues/8176
error: RuntimeError('Could not run any SAT solver.') command: C:\Tools\Progs\python\anaconda3\scripts\conda-script.py install -p C:\Tools\Progs\python\anaconda3 -y anaconda-client==1.7.2 user_agent: conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.15063 _messageid: -9223372036617369659 _messagetime: 1548779675918 / 2019-01-29 10:34:35 Traceback (most recent call last): File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\main_install.py", line 21, in execute install(args, parser, 'install') File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\cli\install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diff force_remove) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 240, in solve_final_state ssc = self._find_inconsistent_packages(ssc) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\core\solve.py", line 342, in _find_inconsistent_packages _, inconsistent_precs = ssc.r.bad_installed(ssc.solution_precs, ()) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 896, in bad_installed C = r2.gen_clauses() File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\io.py", line 85, in decorated return f(*args, **kwds) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\resolve.py", line 668, in gen_clauses C = Clauses(sat_solver_cls=get_sat_solver_cls(context.sat_solver)) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 56, in _memoized_func result = func(*args, **kwargs) File "C:\Tools\Progs\python\anaconda3\lib\site-packages\conda\common\logic.py", line 293, in get_sat_solver_cls raise RuntimeError('Could not run any SAT solver.') RuntimeError: Could not run any SAT solver.
RuntimeError
def _check_files(self): """Check the existence of mandatory files for a given distribution.""" for fname in self.MANDATORY_FILES: if self._metadata_dir_full_path: fpath = join(self._metadata_dir_full_path, fname) if not isfile(fpath): raise OSError(ENOENT, strerror(ENOENT), fpath)
def _check_files(self): """Check the existence of mandatory files for a given distribution.""" for fname in self.MANDATORY_FILES: if self._metadata_dir_full_path: fpath = join(self._metadata_dir_full_path, fname) assert isfile(fpath)
https://github.com/conda/conda/issues/8178
error: AssertionError() command: D:\Users\rahul\Anaconda3\Scripts\conda-script.py list user_agent: conda/4.6.1 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17763 _messageid: -9223372036617369010 _messagetime: 1548792058544 / 2019-01-29 14:00:58 Traceback (most recent call last): File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 142, in execute show_channel_urls=context.show_channel_urls) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 80, in print_packages show_channel_urls=show_channel_urls) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 45, in list_packages installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(), File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 116, in iter_records return itervalues(self._prefix_records) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 145, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 69, in load self._load_site_packages() File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 258, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 245, in read_python_record pydist = PythonDistribution.init(prefix_path, anchor_file, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 78, in init return PythonInstalledDistribution(prefix_path, anchor_file, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 382, in __init__ super(PythonInstalledDistribution, self).__init__(anchor_full_path, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 106, in __init__ self._check_files() File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 116, in _check_files assert isfile(fpath) AssertionError
AssertionError
def _load_site_packages(self): """ Load non-conda-installed python packages in the site-packages of the prefix. Python packages not handled by conda are installed via other means, like using pip or using python setup.py develop for local development. Packages found that are not handled by conda are converted into a prefix record and handled in memory. Packages clobbering conda packages (i.e. the conda-meta record) are removed from the in memory representation. """ python_pkg_record = self._python_pkg_record if not python_pkg_record: return {} site_packages_dir = get_python_site_packages_short_path(python_pkg_record.version) site_packages_path = join(self.prefix_path, win_path_ok(site_packages_dir)) if not isdir(site_packages_path): return {} # Get anchor files for corresponding conda (handled) python packages prefix_graph = PrefixGraph(self.iter_records()) python_records = prefix_graph.all_descendants(python_pkg_record) conda_python_packages = get_conda_anchor_files_and_records(python_records) # Get all anchor files and compare against conda anchor files to find clobbered conda # packages and python packages installed via other means (not handled by conda) sp_anchor_files = get_site_packages_anchor_files( site_packages_path, site_packages_dir ) conda_anchor_files = set(conda_python_packages) clobbered_conda_anchor_files = conda_anchor_files - sp_anchor_files non_conda_anchor_files = sp_anchor_files - conda_anchor_files # If there's a mismatch for anchor files between what conda expects for a package # based on conda-meta, and for what is actually in site-packages, then we'll delete # the in-memory record for the conda package. In the future, we should consider # also deleting the record on disk in the conda-meta/ directory. for conda_anchor_file in clobbered_conda_anchor_files: prefix_rec = self._prefix_records.pop( conda_python_packages[conda_anchor_file].name ) try: extracted_package_dir = basename(prefix_rec.extracted_package_dir) except AttributeError: extracted_package_dir = "-".join( (prefix_rec.name, prefix_rec.version, prefix_rec.build) ) prefix_rec_json_path = join( self.prefix_path, "conda-meta", "%s.json" % extracted_package_dir ) try: rm_rf(prefix_rec_json_path) except EnvironmentError: log.debug( "stale information, but couldn't remove: %s", prefix_rec_json_path ) else: log.debug("removed due to stale information: %s", prefix_rec_json_path) # Create prefix records for python packages not handled by conda new_packages = {} for af in non_conda_anchor_files: try: python_record = read_python_record( self.prefix_path, af, python_pkg_record.version ) except EnvironmentError as e: log.info("Python record ignored for anchor path '%s'\n due to %s", af, e) continue except ValidationError: import sys exc_type, exc_value, exc_traceback = sys.exc_info() import traceback tb = traceback.format_exception(exc_type, exc_value, exc_traceback) log.warn( "Problem reading non-conda package record at %s. Please verify that you " "still need this, and if so, that this is still installed correctly. " "Reinstalling this package may help.", af, ) log.debug("ValidationError: \n%s\n", "\n".join(tb)) continue if not python_record: continue self.__prefix_records[python_record.name] = python_record new_packages[python_record.name] = python_record return new_packages
def _load_site_packages(self): """ Load non-conda-installed python packages in the site-packages of the prefix. Python packages not handled by conda are installed via other means, like using pip or using python setup.py develop for local development. Packages found that are not handled by conda are converted into a prefix record and handled in memory. Packages clobbering conda packages (i.e. the conda-meta record) are removed from the in memory representation. """ python_pkg_record = self._python_pkg_record if not python_pkg_record: return {} site_packages_dir = get_python_site_packages_short_path(python_pkg_record.version) site_packages_path = join(self.prefix_path, win_path_ok(site_packages_dir)) if not isdir(site_packages_path): return {} # Get anchor files for corresponding conda (handled) python packages prefix_graph = PrefixGraph(self.iter_records()) python_records = prefix_graph.all_descendants(python_pkg_record) conda_python_packages = get_conda_anchor_files_and_records(python_records) # Get all anchor files and compare against conda anchor files to find clobbered conda # packages and python packages installed via other means (not handled by conda) sp_anchor_files = get_site_packages_anchor_files( site_packages_path, site_packages_dir ) conda_anchor_files = set(conda_python_packages) clobbered_conda_anchor_files = conda_anchor_files - sp_anchor_files non_conda_anchor_files = sp_anchor_files - conda_anchor_files # If there's a mismatch for anchor files between what conda expects for a package # based on conda-meta, and for what is actually in site-packages, then we'll delete # the in-memory record for the conda package. In the future, we should consider # also deleting the record on disk in the conda-meta/ directory. for conda_anchor_file in clobbered_conda_anchor_files: prefix_rec = self._prefix_records.pop( conda_python_packages[conda_anchor_file].name ) try: extracted_package_dir = basename(prefix_rec.extracted_package_dir) except AttributeError: extracted_package_dir = "-".join( (prefix_rec.name, prefix_rec.version, prefix_rec.build) ) prefix_rec_json_path = join( self.prefix_path, "conda-meta", "%s.json" % extracted_package_dir ) try: rm_rf(prefix_rec_json_path) except EnvironmentError: log.debug( "stale information, but couldn't remove: %s", prefix_rec_json_path ) else: log.debug("removed due to stale information: %s", prefix_rec_json_path) # Create prefix records for python packages not handled by conda new_packages = {} for af in non_conda_anchor_files: try: python_record = read_python_record( self.prefix_path, af, python_pkg_record.version ) except EnvironmentError: continue except ValidationError: import sys exc_type, exc_value, exc_traceback = sys.exc_info() import traceback tb = traceback.format_exception(exc_type, exc_value, exc_traceback) log.warn( "Problem reading non-conda package record at %s. Please verify that you " "still need this, and if so, that this is still installed correctly. " "Reinstalling this package may help.", af, ) log.debug("ValidationError: \n%s\n", "\n".join(tb)) continue if not python_record: continue self.__prefix_records[python_record.name] = python_record new_packages[python_record.name] = python_record return new_packages
https://github.com/conda/conda/issues/8178
error: AssertionError() command: D:\Users\rahul\Anaconda3\Scripts\conda-script.py list user_agent: conda/4.6.1 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17763 _messageid: -9223372036617369010 _messagetime: 1548792058544 / 2019-01-29 14:00:58 Traceback (most recent call last): File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 142, in execute show_channel_urls=context.show_channel_urls) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 80, in print_packages show_channel_urls=show_channel_urls) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 45, in list_packages installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(), File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 116, in iter_records return itervalues(self._prefix_records) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 145, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 69, in load self._load_site_packages() File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 258, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 245, in read_python_record pydist = PythonDistribution.init(prefix_path, anchor_file, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 78, in init return PythonInstalledDistribution(prefix_path, anchor_file, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 382, in __init__ super(PythonInstalledDistribution, self).__init__(anchor_full_path, python_version) File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 106, in __init__ self._check_files() File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 116, in _check_files assert isfile(fpath) AssertionError
AssertionError
def create_file_link_actions( cls, transaction_context, package_info, target_prefix, requested_link_type ): def get_prefix_replace(source_path_data): if source_path_data.path_type == PathType.softlink: link_type = LinkType.copy prefix_placehoder, file_mode = "", None elif source_path_data.prefix_placeholder: link_type = LinkType.copy prefix_placehoder = source_path_data.prefix_placeholder file_mode = source_path_data.file_mode elif source_path_data.no_link: link_type = LinkType.copy prefix_placehoder, file_mode = "", None else: link_type = requested_link_type prefix_placehoder, file_mode = "", None return link_type, prefix_placehoder, file_mode def make_file_link_action(source_path_data): # TODO: this inner function is still kind of a mess noarch = package_info.repodata_record.noarch if noarch == NoarchType.python: sp_dir = transaction_context["target_site_packages_short_path"] if sp_dir is None: raise CondaError( "Unable to determine python site-packages " "dir in target_prefix!\nPlease make sure " "python is installed in %s" % target_prefix ) target_short_path = get_python_noarch_target_path( source_path_data.path, sp_dir ) elif noarch is None or noarch == NoarchType.generic: target_short_path = source_path_data.path else: raise CondaUpgradeError( dals(""" The current version of conda is too old to install this package. Please update conda.""") ) link_type, placeholder, fmode = get_prefix_replace(source_path_data) if placeholder: return PrefixReplaceLinkAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, requested_link_type, placeholder, fmode, source_path_data, ) else: return LinkPathAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, link_type, source_path_data, ) return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths)
def create_file_link_actions( cls, transaction_context, package_info, target_prefix, requested_link_type ): def get_prefix_replace(source_path_data): if source_path_data.path_type == PathType.softlink: link_type = LinkType.copy prefix_placehoder, file_mode = "", None elif source_path_data.prefix_placeholder: link_type = LinkType.copy prefix_placehoder = source_path_data.prefix_placeholder file_mode = source_path_data.file_mode elif source_path_data.no_link: link_type = LinkType.copy prefix_placehoder, file_mode = "", None else: link_type = requested_link_type prefix_placehoder, file_mode = "", None return link_type, prefix_placehoder, file_mode def make_file_link_action(source_path_data): # TODO: this inner function is still kind of a mess noarch = package_info.repodata_record.noarch if noarch == NoarchType.python: sp_dir = transaction_context["target_site_packages_short_path"] target_short_path = get_python_noarch_target_path( source_path_data.path, sp_dir ) elif noarch is None or noarch == NoarchType.generic: target_short_path = source_path_data.path else: raise CondaUpgradeError( dals(""" The current version of conda is too old to install this package. Please update conda.""") ) link_type, placeholder, fmode = get_prefix_replace(source_path_data) if placeholder: return PrefixReplaceLinkAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, requested_link_type, placeholder, fmode, source_path_data, ) else: return LinkPathAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, link_type, source_path_data, ) return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths)
https://github.com/conda/conda/issues/5588
conda install ../conda/bokeh-0.12.7dev3-py_0-noarch.tar.bz2 -p /Users/hsparra/milestone1_py36An 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 : osx-64 conda version : 4.3.21 conda is private : False conda-env version : 4.3.21 conda-build version : 2.1.15 python version : 3.5.2.final.0 requests version : 2.12.4 root environment : /Users/hsparra/anaconda (writable) default environment : /Users/hsparra/milestone1_py36 envs directories : /Users/hsparra/anaconda/envs /Users/hsparra/.conda/envs package cache : /Users/hsparra/anaconda/pkgs /Users/hsparra/.conda/pkgs channel URLs : https://conda.anaconda.org/bokeh/c/dev/osx-64 https://conda.anaconda.org/bokeh/c/dev/noarch https://conda.anaconda.org/anaconda/osx-64 https://conda.anaconda.org/anaconda/noarch https://repo.continuum.io/pkgs/free/osx-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/osx-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/osx-64 https://repo.continuum.io/pkgs/pro/noarch https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/anaconda-fusion/osx-64 https://conda.anaconda.org/anaconda-fusion/noarch https://conda.anaconda.org/anaconda-mosaic/osx-64 https://conda.anaconda.org/anaconda-mosaic/noarch https://conda.anaconda.org/quanyuan/osx-64 https://conda.anaconda.org/quanyuan/noarch config file : /Users/hsparra/.condarc netrc file : None offline mode : False user-agent : conda/4.3.21 requests/2.12.4 CPython/3.5.2 Darwin/16.6.0 OSX/10.12.5 UID:GID : 503:20 $ /Users/hsparra/milestone1_py36/bin/conda install ../conda/bokeh-0.12.7dev3-py_0-noarch.tar.bz2 -p /Users/hsparra/milestone1_py36` Traceback (most recent call last): File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 632, in conda_exception_handler return_value = func(*args, **kwargs) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 137, in _main exit_code = args.func(args, p) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/main_install.py", line 80, in execute install(args, parser, 'install') File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/install.py", line 199, in install explicit(args_packages, prefix, verbose=not context.quiet) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/misc.py", line 110, in explicit execute_actions(actions, index, verbose=verbose) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/plan.py", line 830, in execute_actions execute_instructions(plan, index, verbose) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 247, in execute_instructions cmd(state, arg) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 108, in UNLINKLINKTRANSACTION_CMD txn.execute() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 263, in execute self.verify() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 242, in verify self.prepare() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 173, in prepare concatv(unlink_actions, link_actions)) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 172, in <genexpr> self.all_actions = tuple(per_pkg_actions for per_pkg_actions in File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 169, in <genexpr> for pkg_info, lt in zip(self.packages_info_to_link, link_types) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 406, in make_link_actions file_link_actions = LinkPathAction.create_file_link_actions(*required_quad) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 181, in create_file_link_actions return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 181, in <genexpr> return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 161, in make_file_link_action target_short_path = get_python_noarch_target_path(source_path_info.path, sp_dir) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/common/path.py", line 238, in get_python_noarch_target_path return source_short_path.replace('site-packages', sp_dir, 1) TypeError: Can't convert 'NoneType' object to str implicitly`
TypeError
def make_file_link_action(source_path_data): # TODO: this inner function is still kind of a mess noarch = package_info.repodata_record.noarch if noarch == NoarchType.python: sp_dir = transaction_context["target_site_packages_short_path"] if sp_dir is None: raise CondaError( "Unable to determine python site-packages " "dir in target_prefix!\nPlease make sure " "python is installed in %s" % target_prefix ) target_short_path = get_python_noarch_target_path(source_path_data.path, sp_dir) elif noarch is None or noarch == NoarchType.generic: target_short_path = source_path_data.path else: raise CondaUpgradeError( dals(""" The current version of conda is too old to install this package. Please update conda.""") ) link_type, placeholder, fmode = get_prefix_replace(source_path_data) if placeholder: return PrefixReplaceLinkAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, requested_link_type, placeholder, fmode, source_path_data, ) else: return LinkPathAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, link_type, source_path_data, )
def make_file_link_action(source_path_data): # TODO: this inner function is still kind of a mess noarch = package_info.repodata_record.noarch if noarch == NoarchType.python: sp_dir = transaction_context["target_site_packages_short_path"] target_short_path = get_python_noarch_target_path(source_path_data.path, sp_dir) elif noarch is None or noarch == NoarchType.generic: target_short_path = source_path_data.path else: raise CondaUpgradeError( dals(""" The current version of conda is too old to install this package. Please update conda.""") ) link_type, placeholder, fmode = get_prefix_replace(source_path_data) if placeholder: return PrefixReplaceLinkAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, requested_link_type, placeholder, fmode, source_path_data, ) else: return LinkPathAction( transaction_context, package_info, package_info.extracted_package_dir, source_path_data.path, target_prefix, target_short_path, link_type, source_path_data, )
https://github.com/conda/conda/issues/5588
conda install ../conda/bokeh-0.12.7dev3-py_0-noarch.tar.bz2 -p /Users/hsparra/milestone1_py36An 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 : osx-64 conda version : 4.3.21 conda is private : False conda-env version : 4.3.21 conda-build version : 2.1.15 python version : 3.5.2.final.0 requests version : 2.12.4 root environment : /Users/hsparra/anaconda (writable) default environment : /Users/hsparra/milestone1_py36 envs directories : /Users/hsparra/anaconda/envs /Users/hsparra/.conda/envs package cache : /Users/hsparra/anaconda/pkgs /Users/hsparra/.conda/pkgs channel URLs : https://conda.anaconda.org/bokeh/c/dev/osx-64 https://conda.anaconda.org/bokeh/c/dev/noarch https://conda.anaconda.org/anaconda/osx-64 https://conda.anaconda.org/anaconda/noarch https://repo.continuum.io/pkgs/free/osx-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/osx-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/osx-64 https://repo.continuum.io/pkgs/pro/noarch https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://conda.anaconda.org/anaconda-fusion/osx-64 https://conda.anaconda.org/anaconda-fusion/noarch https://conda.anaconda.org/anaconda-mosaic/osx-64 https://conda.anaconda.org/anaconda-mosaic/noarch https://conda.anaconda.org/quanyuan/osx-64 https://conda.anaconda.org/quanyuan/noarch config file : /Users/hsparra/.condarc netrc file : None offline mode : False user-agent : conda/4.3.21 requests/2.12.4 CPython/3.5.2 Darwin/16.6.0 OSX/10.12.5 UID:GID : 503:20 $ /Users/hsparra/milestone1_py36/bin/conda install ../conda/bokeh-0.12.7dev3-py_0-noarch.tar.bz2 -p /Users/hsparra/milestone1_py36` Traceback (most recent call last): File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 632, in conda_exception_handler return_value = func(*args, **kwargs) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/main.py", line 137, in _main exit_code = args.func(args, p) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/main_install.py", line 80, in execute install(args, parser, 'install') File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/cli/install.py", line 199, in install explicit(args_packages, prefix, verbose=not context.quiet) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/misc.py", line 110, in explicit execute_actions(actions, index, verbose=verbose) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/plan.py", line 830, in execute_actions execute_instructions(plan, index, verbose) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 247, in execute_instructions cmd(state, arg) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 108, in UNLINKLINKTRANSACTION_CMD txn.execute() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 263, in execute self.verify() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 242, in verify self.prepare() File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 173, in prepare concatv(unlink_actions, link_actions)) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 172, in <genexpr> self.all_actions = tuple(per_pkg_actions for per_pkg_actions in File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 169, in <genexpr> for pkg_info, lt in zip(self.packages_info_to_link, link_types) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/link.py", line 406, in make_link_actions file_link_actions = LinkPathAction.create_file_link_actions(*required_quad) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 181, in create_file_link_actions return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 181, in <genexpr> return tuple(make_file_link_action(spi) for spi in package_info.paths_data.paths) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/core/path_actions.py", line 161, in make_file_link_action target_short_path = get_python_noarch_target_path(source_path_info.path, sp_dir) File "/Users/hsparra/anaconda/lib/python3.5/site-packages/conda/common/path.py", line 238, in get_python_noarch_target_path return source_short_path.replace('site-packages', sp_dir, 1) TypeError: Can't convert 'NoneType' object to str implicitly`
TypeError
def _read_windows_registry(target_path): # pragma: no cover # HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun # HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun # returns value_value, value_type -or- None, None if target does not exist main_key, the_rest = target_path.split("\\", 1) subkey_str, value_name = the_rest.rsplit("\\", 1) main_key = getattr(winreg, main_key) try: key = winreg.OpenKey(main_key, subkey_str, 0, winreg.KEY_READ) except EnvironmentError as e: if e.errno != ENOENT: raise return None, None try: value_tuple = winreg.QueryValueEx(key, value_name) value_value = value_tuple[0] if isinstance(value_value, str): value_value = value_value.strip() value_type = value_tuple[1] return value_value, value_type except Exception: # [WinError 2] The system cannot find the file specified winreg.CloseKey(key) return None, None finally: winreg.CloseKey(key)
def _read_windows_registry(target_path): # pragma: no cover # HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun # HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun # returns value_value, value_type -or- None, None if target does not exist main_key, the_rest = target_path.split("\\", 1) subkey_str, value_name = the_rest.rsplit("\\", 1) main_key = getattr(winreg, main_key) try: key = winreg.OpenKey(main_key, subkey_str, 0, winreg.KEY_READ) except EnvironmentError as e: if e.errno != ENOENT: raise return None, None try: value_tuple = winreg.QueryValueEx(key, value_name) value_value = value_tuple[0].strip() value_type = value_tuple[1] return value_value, value_type except Exception: # [WinError 2] The system cannot find the file specified winreg.CloseKey(key) return None, None finally: winreg.CloseKey(key)
https://github.com/conda/conda/issues/7952
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "c:\users\wani\downloads\repos\conda\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "c:\users\wani\downloads\repos\conda\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "c:\users\wani\downloads\repos\conda\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "c:\users\wani\downloads\repos\conda\conda\cli\main_init.py", line 52, in execute anaconda_prompt) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 106, in initialize run_plan(plan2) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 552, in run_plan result = globals()[step['function']](*step.get('args', ()), **step.get('kwargs', {})) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 1196, in init_long_path _write_windows_registry(target_path, "1", winreg.REG_DWORD) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 1143, in _write_windows_registry winreg.SetValueEx(key, value_name, 0, value_type, value_value) ValueError: Could not convert the data to the specified type. `$ C:\ProgramData\MinicondaX\Scripts\conda-script.py init --system cmd.exe`
ValueError
def init_long_path(target_path): win_ver, _, win_rev = context.os_distribution_name_version[1].split(".") # win10, build 14352 was the first preview release that supported this if int(win_ver) >= 10 and int(win_rev) >= 14352: prev_value, value_type = _read_windows_registry(target_path) if str(prev_value) != "1": if context.verbosity: print("\n") print(target_path) print(make_diff(str(prev_value), "1")) if not context.dry_run: _write_windows_registry(target_path, 1, winreg.REG_DWORD) return Result.MODIFIED else: return Result.NO_CHANGE else: if context.verbosity: print("\n") print( "Not setting long path registry key; Windows version must be at least 10 with " 'the fall 2016 "Anniversary update" or newer.' ) return Result.NO_CHANGE
def init_long_path(target_path): win_ver, _, win_rev = context.os_distribution_name_version[1].split(".") # win10, build 14352 was the first preview release that supported this if int(win_ver) >= 10 and int(win_rev) >= 14352: prev_value, value_type = _read_windows_registry(target_path) if prev_value != "1": if context.verbosity: print("\n") print(target_path) print(make_diff(prev_value, "1")) if not context.dry_run: _write_windows_registry(target_path, "1", winreg.REG_DWORD) return Result.MODIFIED else: return Result.NO_CHANGE else: if context.verbosity: print("\n") print( "Not setting long path registry key; Windows version must be at least 10 with " 'the fall 2016 "Anniversary update" or newer.' ) return Result.NO_CHANGE
https://github.com/conda/conda/issues/7952
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "c:\users\wani\downloads\repos\conda\conda\exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "c:\users\wani\downloads\repos\conda\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "c:\users\wani\downloads\repos\conda\conda\cli\conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "c:\users\wani\downloads\repos\conda\conda\cli\main_init.py", line 52, in execute anaconda_prompt) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 106, in initialize run_plan(plan2) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 552, in run_plan result = globals()[step['function']](*step.get('args', ()), **step.get('kwargs', {})) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 1196, in init_long_path _write_windows_registry(target_path, "1", winreg.REG_DWORD) File "c:\users\wani\downloads\repos\conda\conda\core\initialize.py", line 1143, in _write_windows_registry winreg.SetValueEx(key, value_name, 0, value_type, value_value) ValueError: Could not convert the data to the specified type. `$ C:\ProgramData\MinicondaX\Scripts\conda-script.py init --system cmd.exe`
ValueError
def _load_site_packages(self): """ Load non-conda-installed python packages in the site-packages of the prefix. Python packages not handled by conda are installed via other means, like using pip or using python setup.py develop for local development. Packages found that are not handled by conda are converted into a prefix record and handled in memory. Packages clobbering conda packages (i.e. the conda-meta record) are removed from the in memory representation. """ python_pkg_record = self._python_pkg_record if not python_pkg_record: return {} site_packages_dir = get_python_site_packages_short_path(python_pkg_record.version) site_packages_path = join(self.prefix_path, win_path_ok(site_packages_dir)) if not isdir(site_packages_path): return {} # Get anchor files for corresponding conda (handled) python packages prefix_graph = PrefixGraph(self.iter_records()) python_records = prefix_graph.all_descendants(python_pkg_record) conda_python_packages = get_conda_anchor_files_and_records(python_records) # Get all anchor files and compare against conda anchor files to find clobbered conda # packages and python packages installed via other means (not handled by conda) sp_anchor_files = get_site_packages_anchor_files( site_packages_path, site_packages_dir ) conda_anchor_files = set(conda_python_packages) clobbered_conda_anchor_files = conda_anchor_files - sp_anchor_files non_conda_anchor_files = sp_anchor_files - conda_anchor_files # If there's a mismatch for anchor files between what conda expects for a package # based on conda-meta, and for what is actually in site-packages, then we'll delete # the in-memory record for the conda package. In the future, we should consider # also deleting the record on disk in the conda-meta/ directory. for conda_anchor_file in clobbered_conda_anchor_files: prefix_rec = self._prefix_records.pop( conda_python_packages[conda_anchor_file].name ) try: extracted_package_dir = basename(prefix_rec.extracted_package_dir) except AttributeError: extracted_package_dir = "-".join( (prefix_rec.name, prefix_rec.version, prefix_rec.build) ) prefix_rec_json_path = join( self.prefix_path, "conda-meta", "%s.json" % extracted_package_dir ) try: rm_rf(prefix_rec_json_path) except EnvironmentError: log.debug( "stale information, but couldn't remove: %s", prefix_rec_json_path ) else: log.debug("removed due to stale information: %s", prefix_rec_json_path) # Create prefix records for python packages not handled by conda new_packages = {} for af in non_conda_anchor_files: try: python_record = read_python_record( self.prefix_path, af, python_pkg_record.version ) except EnvironmentError: continue except ValidationError: import sys exc_type, exc_value, exc_traceback = sys.exc_info() import traceback tb = traceback.format_exception(exc_type, exc_value, exc_traceback) log.warn( "Problem reading non-conda package record at %s. Please verify that you " "still need this, and if so, that this is still installed correctly. " "Reinstalling this package may help.", af, ) log.debug("ValidationError: \n%s\n", "\n".join(tb)) continue if not python_record: continue self.__prefix_records[python_record.name] = python_record new_packages[python_record.name] = python_record return new_packages
def _load_site_packages(self): """ Load non-conda-installed python packages in the site-packages of the prefix. Python packages not handled by conda are installed via other means, like using pip or using python setup.py develop for local development. Packages found that are not handled by conda are converted into a prefix record and handled in memory. Packages clobbering conda packages (i.e. the conda-meta record) are removed from the in memory representation. """ python_pkg_record = self._python_pkg_record if not python_pkg_record: return {} site_packages_dir = get_python_site_packages_short_path(python_pkg_record.version) site_packages_path = join(self.prefix_path, win_path_ok(site_packages_dir)) if not isdir(site_packages_path): return {} # Get anchor files for corresponding conda (handled) python packages prefix_graph = PrefixGraph(self.iter_records()) python_records = prefix_graph.all_descendants(python_pkg_record) conda_python_packages = get_conda_anchor_files_and_records(python_records) # Get all anchor files and compare against conda anchor files to find clobbered conda # packages and python packages installed via other means (not handled by conda) sp_anchor_files = get_site_packages_anchor_files( site_packages_path, site_packages_dir ) conda_anchor_files = set(conda_python_packages) clobbered_conda_anchor_files = conda_anchor_files - sp_anchor_files non_conda_anchor_files = sp_anchor_files - conda_anchor_files # If there's a mismatch for anchor files between what conda expects for a package # based on conda-meta, and for what is actually in site-packages, then we'll delete # the in-memory record for the conda package. In the future, we should consider # also deleting the record on disk in the conda-meta/ directory. for conda_anchor_file in clobbered_conda_anchor_files: prefix_rec = self._prefix_records.pop( conda_python_packages[conda_anchor_file].name ) try: extracted_package_dir = basename(prefix_rec.extracted_package_dir) except AttributeError: extracted_package_dir = "-".join( (prefix_rec.name, prefix_rec.version, prefix_rec.build) ) prefix_rec_json_path = join( self.prefix_path, "conda-meta", "%s.json" % extracted_package_dir ) try: rm_rf(prefix_rec_json_path) except EnvironmentError: log.debug( "stale information, but couldn't remove: %s", prefix_rec_json_path ) else: log.debug("removed due to stale information: %s", prefix_rec_json_path) # Create prefix records for python packages not handled by conda new_packages = {} for af in non_conda_anchor_files: try: python_record = read_python_record( self.prefix_path, af, python_pkg_record.version ) except EnvironmentError: continue if not python_record: continue self.__prefix_records[python_record.name] = python_record new_packages[python_record.name] = python_record return new_packages
https://github.com/conda/conda/issues/7914
Traceback (most recent call last): File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1001, in __call__ return func(*args, **kwargs) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main exit_code = do_call(args, p) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 81, in do_call exit_code = getattr(module, func_name)(args, parser) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 21, in execute install(args, parser, 'install') File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 250, in install force_reinstall=context.force_reinstall or context.force, File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 107, in solve_for_transaction force_remove, force_reinstall) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 145, in solve_for_diff force_remove) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 206, in solve_final_state self.prefix, update_modifier, deps_modifier, prune, ignore_pinned, force_remove File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 729, in __init__ self.solution_precs = tuple(self.prefix_data.iter_records()) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 115, in iter_records return itervalues(self._prefix_records) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 144, in _prefix_records return self.__prefix_records or self.load() or self.__prefix_records File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 68, in load self._load_site_packages() File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 257, in _load_site_packages python_record = read_python_record(self.prefix_path, af, python_pkg_record.version) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/gateways/disk/read.py", line 298, in read_python_record constrains=constrains, File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 719, in __call__ instance = super(EntityType, cls).__call__(*args, **kwargs) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 736, in __init__ setattr(self, key, kwargs[key]) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 427, in __set__ instance.__dict__[self.name] = self.validate(instance, self.box(instance, instance.__class__, val)) File "/Users/msarahan/miniconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/entity.py", line 470, in validate raise ValidationError(getattr(self, 'name', 'undefined name'), val) conda._vendor.auxlib.exceptions.ValidationError: Value for version cannot be None.
conda._vendor.auxlib.exceptions.ValidationError
def make_raw_parameters_from_file(cls, filepath): with open(filepath, "r") as fh: try: ruamel_yaml = yaml_load(fh) except ScannerError as err: mark = err.problem_mark raise ConfigurationLoadError( filepath, " reason: invalid yaml at line %(line)s, column %(column)s", line=mark.line, column=mark.column, ) except ReaderError as err: raise ConfigurationLoadError( filepath, " reason: invalid yaml at position %(position)s", position=err.position, ) return cls.make_raw_parameters(filepath, ruamel_yaml) or EMPTY_MAP
def make_raw_parameters_from_file(cls, filepath): with open(filepath, "r") as fh: try: ruamel_yaml = yaml_load(fh) except ScannerError as err: mark = err.problem_mark raise LoadError("Invalid YAML", filepath, mark.line, mark.column) return cls.make_raw_parameters(filepath, ruamel_yaml) or EMPTY_MAP
https://github.com/conda/conda/issues/7242
Traceback (most recent call last): File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\cli\main.py", line 97, in main from ..activate import main as activator_main File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\activate.py", line 12, in <module> context.__init__() # oOn import, context does not include SEARCH_PATH. This line fixes that. File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\base\context.py", line 236, in __init__ argparse_args=argparse_args) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 722, in __init__ self._set_search_path(search_path) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 728, in _set_search_path self._set_raw_data(load_file_configs(search_path)) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 369, in load_file_configs raw_data = odict(kv for kv in chain.from_iterable(load_paths)) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 369, in <genexpr> raw_data = odict(kv for kv in chain.from_iterable(load_paths)) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 344, in _file_yaml_loader yield fullpath, YamlRawParameter.make_raw_parameters_from_file(fullpath) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\configuration.py", line 332, in make_raw_parameters_from_file ruamel_yaml = yaml_load(fh) File "C:\Users\Subham\Anaconda3\lib\site-packages\conda\common\serialize.py", line 54, in yaml_load return yaml.load(string, Loader=yaml.RoundTripLoader, version="1.2") File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\main.py", line 73, in load loader = Loader(stream, version, preserve_quotes=preserve_quotes) File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\loader.py", line 56, in __init__ Reader.__init__(self, stream) File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\reader.py", line 98, in __init__ self.determine_encoding() File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\reader.py", line 149, in determine_encoding self.update(1) File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\reader.py", line 189, in update self.check_printable(data) File "C:\Users\Subham\Anaconda3\lib\site-packages\ruamel_yaml\reader.py", line 160, in check_printable 'unicode', "special characters are not allowed") ruamel_yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed in "C:\Users\Subham\.condarc", position 0
ruamel_yaml.reader.ReaderError
def _get_starting_path_list(self): path = self.environ.get("PATH", "") if on_win: # On Windows, the Anaconda Python interpreter prepends sys.prefix\Library\bin on # startup. It's a hack that allows users to avoid using the correct activation # procedure; a hack that needs to go away because it doesn't add all the paths. # See: https://github.com/AnacondaRecipes/python-feedstock/blob/master/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch # NOQA # But, we now detect if that has happened because: # 1. In future we would like to remove this hack and require real activation. # 2. We should not assume that the Anaconda Python interpreter is being used. path_split = path.split(os.pathsep) library_bin = r"%s\Library\bin" % (sys.prefix) # ^^^ deliberately the same as: https://github.com/AnacondaRecipes/python-feedstock/blob/8e8aee4e2f4141ecfab082776a00b374c62bb6d6/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch#L20 # NOQA if paths_equal(path_split[0], library_bin): return path_split[1:] else: return path_split else: return path.split(os.pathsep)
def _get_starting_path_list(self): path = self.environ["PATH"] if on_win: # On Windows, the Anaconda Python interpreter prepends sys.prefix\Library\bin on # startup. It's a hack that allows users to avoid using the correct activation # procedure; a hack that needs to go away because it doesn't add all the paths. # See: https://github.com/AnacondaRecipes/python-feedstock/blob/master/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch # NOQA # But, we now detect if that has happened because: # 1. In future we would like to remove this hack and require real activation. # 2. We should not assume that the Anaconda Python interpreter is being used. path_split = path.split(os.pathsep) library_bin = r"%s\Library\bin" % (sys.prefix) # ^^^ deliberately the same as: https://github.com/AnacondaRecipes/python-feedstock/blob/8e8aee4e2f4141ecfab082776a00b374c62bb6d6/recipe/0005-Win32-Ensure-Library-bin-is-in-os.environ-PATH.patch#L20 # NOQA if paths_equal(path_split[0], library_bin): return path_split[1:] else: return path_split else: return path.split(os.pathsep)
https://github.com/conda/conda/issues/7486
$ env -i bash --norc --noprofile bash-4.1$ /path/to/conda/anaconda3/bin/conda shell.posix activate # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 98, in main return activator_main() File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 584, in main print(activator.execute(), end='') File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 157, in execute return getattr(self, self.command)() File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 143, in activate return self._finalize(self._yield_commands(self.build_activate(self.env_name_or_prefix)), File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 244, in build_activate new_path = self.pathsep_join(self._add_prefix_to_path(prefix)) File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 417, in _add_prefix_to_path starting_path_dirs = self._get_starting_path_list() File "/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 384, in _get_starting_path_list path = self.environ['PATH'] KeyError: 'PATH' `$ /group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/bin/conda shell.posix activate` environment variables: CIO_TEST=<not set> CONDA_ROOT=/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3 REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : None user config file : /home/users/gholl/.condarc populated config files : /home/users/gholl/.condarc conda version : 4.5.4 conda-build version : 3.0.27 python version : 3.6.3.final.0 base environment : /group_workspaces/cems2/fiduceo/Users/gholl/anaconda3 (writable) channel URLs : https://conda.anaconda.org/rttools/linux-64 https://conda.anaconda.org/rttools/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/linux-64 https://repo.anaconda.com/pkgs/pro/noarch package cache : /group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/pkgs /home/users/gholl/.conda/pkgs envs directories : /group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/envs /home/users/gholl/.conda/envs platform : linux-64 user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.3 Linux/2.6.32-754.el6.x86_64 rhel/6.10 glibc/2.12 UID:GID : 35063:26030 netrc file : None offline mode : False An unexpected error has occurred. Conda has prepared the above report. Upload successful.
KeyError
def should_bypass_proxies_patched(should_bypass_proxies_func, url, no_proxy): # Monkey patch requests, per https://github.com/requests/requests/pull/4723 if url.startswith("file://"): return True try: return should_bypass_proxies_func(url, no_proxy) except TypeError: # For versions of requests we shouldn't have to deal with. # https://github.com/conda/conda/issues/7503 # https://github.com/conda/conda/issues/7506 return should_bypass_proxies_func(url)
def should_bypass_proxies_patched(should_bypass_proxies_func, url, no_proxy): # Monkey patch requests, per https://github.com/requests/requests/pull/4723 if url.startswith("file://"): return True return should_bypass_proxies_func(url, no_proxy)
https://github.com/conda/conda/issues/7506
~ $ conda update --all Solving environment: failed # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/exceptions.py", line 819, in __call__ return func(*args, **kwargs) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/main_update.py", line 14, in execute install(args, parser, 'update') File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/cli/install.py", line 235, in install force_reinstall=context.force, File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 506, in solve_for_transaction force_remove, force_reinstall) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 439, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 180, in solve_final_state index, r = self._prepare(prepared_specs) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/solve.py", line 580, in _prepare self.subdirs, prepared_specs) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/index.py", line 215, in get_reduced_index new_records = query_all(spec) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/index.py", line 184, in query_all return tuple(concat(future.result() for future in as_completed(futures))) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 94, in query self.load() File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 148, in load _internal_state = self._load() File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 216, in _load mod_etag_headers.get('_mod')) File "/Users/apple/anaconda/lib/python3.6/site-packages/conda/core/subdir_data.py", line 416, in fetch_repodata_remote_request timeout=timeout) File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 480, in get return self.request('GET', url, **kwargs) File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 459, in request prep.url, proxies, stream, verify, cert File "/Users/apple/.local/lib/python3.6/site-packages/requests/sessions.py", line 617, in merge_environment_settings env_proxies = get_environ_proxies(url) or {} File "/Users/apple/.local/lib/python3.6/site-packages/requests/utils.py", line 562, in get_environ_proxies if should_bypass_proxies(url): TypeError: should_bypass_proxies_patched() missing 1 required positional argument: 'no_proxy' `$ /Users/apple/anaconda/bin/conda update --all` environment variables: CIO_TEST=<not set> CONDA_ROOT=/Users/apple/anaconda PATH=~/Library/Python/2.7/bin:/Users/apple/anaconda/bin:/usr/bin:/bin:/usr/ sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Fr ameworks/Mono.framework/Versions/Current/Commands:/Applications/Wiresh ark.app/Contents/MacOS REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set>
TypeError
def get_user_requests(self): """ return a list of user requested items. Each item is a dict with the following keys: 'date': the date and time running the command 'cmd': a list of argv of the actual command which was run 'action': install/remove/update 'specs': the specs being used """ res = [] for dt, unused_cont, comments in self.parse(): item = {"date": dt} for line in comments: comment_items = self._parse_comment_line(line) item.update(comment_items) if "cmd" in item: res.append(item) dists = groupby(itemgetter(0), unused_cont) item["unlink_dists"] = dists.get("-", ()) item["link_dists"] = dists.get("+", ()) return res
def get_user_requests(self): """ return a list of user requested items. Each item is a dict with the following keys: 'date': the date and time running the command 'cmd': a list of argv of the actual command which was run 'action': install/remove/update 'specs': the specs being used """ res = [] com_pat = re.compile(r"#\s*cmd:\s*(.+)") spec_pat = re.compile(r"#\s*(\w+)\s*specs:\s*(.+)?") for dt, unused_cont, comments in self.parse(): item = {"date": dt} for line in comments: m = com_pat.match(line) if m: argv = m.group(1).split() if argv[0].endswith("conda"): argv[0] = "conda" item["cmd"] = argv m = spec_pat.match(line) if m: action, specs = m.groups() item["action"] = action specs = specs or "" if specs.startswith("["): specs = literal_eval(specs) elif "[" not in specs: specs = specs.split(",") specs = [spec for spec in specs if spec and not spec.endswith("@")] if specs and action in ("update", "install", "create"): item["update_specs"] = item["specs"] = specs elif specs and action in ("remove", "uninstall"): item["remove_specs"] = item["specs"] = specs if "cmd" in item: res.append(item) dists = groupby(itemgetter(0), unused_cont) item["unlink_dists"] = dists.get("-", ()) item["link_dists"] = dists.get("+", ()) return res
https://github.com/conda/conda/issues/6691
$ conda --version conda 4.4.7 $ conda install -vvv numpy DEBUG conda.gateways.logging:set_verbosity(148): verbosity set to 3 Solving environment: ...working... DEBUG conda.core.solve:solve_final_state(140): solving prefix /scratch/mc3 specs_to_remove: frozenset() specs_to_add: frozenset({MatchSpec(name=LowerStrMatch('numpy'))}) prune: False TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/appnope-0.1.0-py36hf537a9a_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/asn1crypto-0.23.0-py36h782d450_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/bleach-2.1.1-py36h27c13d8_0.json [...] TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zeromq-4.2.2-ha360ad0_2.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zlib-1.2.11-hf3cbc9b_2.json failed Traceback (most recent call last): File "/scratch/mc3/lib/python3.6/site-packages/conda/exceptions.py", line 743, in __call__ return func(*args, **kwargs) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 76, in do_call exit_code = getattr(module, func_name)(args, parser) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 146, in solve_final_state specs_from_history_map = History(self.prefix).get_requested_specs_map() File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in get_requested_specs_map spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in <genexpr> spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 186, in <genexpr> update_specs = (MatchSpec(spec) for spec in request.get('update_specs', ())) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 39, in __call__ parsed = _parse_spec_str(spec_arg) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 556, in _parse_spec_str raise CondaValueError("Invalid MatchSpec: %s" % spec_str) conda.exceptions.CondaValueError: Invalid MatchSpec: <2.0
conda.exceptions.CondaValueError
def get_reduced_index(prefix, channels, subdirs, specs): # # this block of code is a "combine" step intended to filter out redundant specs # # causes a problem with py.test tests/core/test_solve.py -k broken_install # specs_map = defaultdict(list) # for spec in specs: # specs_map[spec.name].append(spec) # consolidated_specs = set() # for spec_name, specs_group in iteritems(specs_map): # if len(specs_group) == 1: # consolidated_specs.add(specs_group[0]) # elif spec_name == '*': # consolidated_specs.update(specs_group) # else: # keep_specs = [] # for spec in specs_group: # if len(spec._match_components) > 1 or spec.target or spec.optional: # keep_specs.append(spec) # consolidated_specs.update(keep_specs) with ThreadLimitedThreadPoolExecutor() as executor: channel_urls = all_channel_urls(channels, subdirs=subdirs) check_whitelist(channel_urls) if context.offline: grouped_urls = groupby(lambda url: url.startswith("file://"), channel_urls) ignored_urls = grouped_urls.get(False, ()) if ignored_urls: log.info( "Ignoring the following channel urls because mode is offline.%s", dashlist(ignored_urls), ) channel_urls = IndexedSet(grouped_urls.get(True, ())) subdir_datas = tuple(SubdirData(Channel(url)) for url in channel_urls) records = IndexedSet() collected_names = set() collected_track_features = set() pending_names = set() pending_track_features = set() def query_all(spec): futures = tuple(executor.submit(sd.query, spec) for sd in subdir_datas) return tuple(concat(future.result() for future in as_completed(futures))) def push_spec(spec): name = spec.get_raw_value("name") if name and name not in collected_names: pending_names.add(name) track_features = spec.get_raw_value("track_features") if track_features: for ftr_name in track_features: if ftr_name not in collected_track_features: pending_track_features.add(ftr_name) def push_record(record): push_spec(MatchSpec(record.name)) for _spec in record.combined_depends: push_spec(_spec) if record.track_features: for ftr_name in record.track_features: push_spec(MatchSpec(track_features=ftr_name)) if prefix: for prefix_rec in PrefixData(prefix).iter_records(): push_record(prefix_rec) for spec in specs: push_spec(spec) while pending_names or pending_track_features: while pending_names: name = pending_names.pop() collected_names.add(name) spec = MatchSpec(name) new_records = query_all(spec) for record in new_records: push_record(record) records.update(new_records) while pending_track_features: feature_name = pending_track_features.pop() collected_track_features.add(feature_name) spec = MatchSpec(track_features=feature_name) new_records = query_all(spec) for record in new_records: push_record(record) records.update(new_records) reduced_index = {Dist(rec): rec for rec in records} if prefix is not None: _supplement_index_with_prefix(reduced_index, prefix) if context.offline or ( "unknown" in context._argparse_args and context._argparse_args.unknown ): # This is really messed up right now. Dates all the way back to # https://github.com/conda/conda/commit/f761f65a82b739562a0d997a2570e2b8a0bdc783 # TODO: revisit this later _supplement_index_with_cache(reduced_index) # add feature records for the solver known_features = set() for rec in itervalues(reduced_index): known_features.update(concatv(rec.track_features, rec.features)) known_features.update(context.track_features) for ftr_str in known_features: rec = make_feature_record(ftr_str) reduced_index[Dist(rec)] = rec return reduced_index
def get_reduced_index(prefix, channels, subdirs, specs): # # this block of code is a "combine" step intended to filter out redundant specs # # causes a problem with py.test tests/core/test_solve.py -k broken_install # specs_map = defaultdict(list) # for spec in specs: # specs_map[spec.name].append(spec) # consolidated_specs = set() # for spec_name, specs_group in iteritems(specs_map): # if len(specs_group) == 1: # consolidated_specs.add(specs_group[0]) # elif spec_name == '*': # consolidated_specs.update(specs_group) # else: # keep_specs = [] # for spec in specs_group: # if len(spec._match_components) > 1 or spec.target or spec.optional: # keep_specs.append(spec) # consolidated_specs.update(keep_specs) with ThreadLimitedThreadPoolExecutor() as executor: channel_urls = all_channel_urls(channels, subdirs=subdirs) check_whitelist(channel_urls) if context.offline: grouped_urls = groupby(lambda url: url.startswith("file://"), channel_urls) ignored_urls = grouped_urls.get(False, ()) if ignored_urls: log.info( "Ignoring the following channel urls because mode is offline.%s", dashlist(ignored_urls), ) channel_urls = IndexedSet(grouped_urls.get(True, ())) subdir_datas = tuple(SubdirData(Channel(url)) for url in channel_urls) records = IndexedSet() collected_names = set() collected_track_features = set() pending_names = set() pending_track_features = set() def query_all(spec): futures = tuple(executor.submit(sd.query, spec) for sd in subdir_datas) return tuple(concat(future.result() for future in as_completed(futures))) def push_spec(spec): name = spec.get_raw_value("name") if name and name not in collected_names: pending_names.add(name) track_features = spec.get_raw_value("track_features") if track_features: for ftr_name in track_features: if ftr_name not in collected_track_features: pending_track_features.add(ftr_name) def push_record(record): for _spec in record.combined_depends: push_spec(_spec) if record.track_features: for ftr_name in record.track_features: push_spec(MatchSpec(track_features=ftr_name)) for spec in specs: push_spec(spec) while pending_names or pending_track_features: while pending_names: name = pending_names.pop() collected_names.add(name) spec = MatchSpec(name) new_records = query_all(spec) for record in new_records: push_record(record) records.update(new_records) while pending_track_features: feature_name = pending_track_features.pop() collected_track_features.add(feature_name) spec = MatchSpec(track_features=feature_name) new_records = query_all(spec) for record in new_records: push_record(record) records.update(new_records) reduced_index = {Dist(rec): rec for rec in records} if prefix is not None: _supplement_index_with_prefix(reduced_index, prefix) if context.offline or ( "unknown" in context._argparse_args and context._argparse_args.unknown ): # This is really messed up right now. Dates all the way back to # https://github.com/conda/conda/commit/f761f65a82b739562a0d997a2570e2b8a0bdc783 # TODO: revisit this later _supplement_index_with_cache(reduced_index) # add feature records for the solver known_features = set() for rec in itervalues(reduced_index): known_features.update(concatv(rec.track_features, rec.features)) known_features.update(context.track_features) for ftr_str in known_features: rec = make_feature_record(ftr_str) reduced_index[Dist(rec)] = rec return reduced_index
https://github.com/conda/conda/issues/6691
$ conda --version conda 4.4.7 $ conda install -vvv numpy DEBUG conda.gateways.logging:set_verbosity(148): verbosity set to 3 Solving environment: ...working... DEBUG conda.core.solve:solve_final_state(140): solving prefix /scratch/mc3 specs_to_remove: frozenset() specs_to_add: frozenset({MatchSpec(name=LowerStrMatch('numpy'))}) prune: False TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/appnope-0.1.0-py36hf537a9a_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/asn1crypto-0.23.0-py36h782d450_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/bleach-2.1.1-py36h27c13d8_0.json [...] TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zeromq-4.2.2-ha360ad0_2.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zlib-1.2.11-hf3cbc9b_2.json failed Traceback (most recent call last): File "/scratch/mc3/lib/python3.6/site-packages/conda/exceptions.py", line 743, in __call__ return func(*args, **kwargs) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 76, in do_call exit_code = getattr(module, func_name)(args, parser) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 146, in solve_final_state specs_from_history_map = History(self.prefix).get_requested_specs_map() File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in get_requested_specs_map spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in <genexpr> spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 186, in <genexpr> update_specs = (MatchSpec(spec) for spec in request.get('update_specs', ())) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 39, in __call__ parsed = _parse_spec_str(spec_arg) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 556, in _parse_spec_str raise CondaValueError("Invalid MatchSpec: %s" % spec_str) conda.exceptions.CondaValueError: Invalid MatchSpec: <2.0
conda.exceptions.CondaValueError
def push_record(record): push_spec(MatchSpec(record.name)) for _spec in record.combined_depends: push_spec(_spec) if record.track_features: for ftr_name in record.track_features: push_spec(MatchSpec(track_features=ftr_name))
def push_record(record): for _spec in record.combined_depends: push_spec(_spec) if record.track_features: for ftr_name in record.track_features: push_spec(MatchSpec(track_features=ftr_name))
https://github.com/conda/conda/issues/6691
$ conda --version conda 4.4.7 $ conda install -vvv numpy DEBUG conda.gateways.logging:set_verbosity(148): verbosity set to 3 Solving environment: ...working... DEBUG conda.core.solve:solve_final_state(140): solving prefix /scratch/mc3 specs_to_remove: frozenset() specs_to_add: frozenset({MatchSpec(name=LowerStrMatch('numpy'))}) prune: False TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/appnope-0.1.0-py36hf537a9a_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/asn1crypto-0.23.0-py36h782d450_0.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/bleach-2.1.1-py36h27c13d8_0.json [...] TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zeromq-4.2.2-ha360ad0_2.json TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zlib-1.2.11-hf3cbc9b_2.json failed Traceback (most recent call last): File "/scratch/mc3/lib/python3.6/site-packages/conda/exceptions.py", line 743, in __call__ return func(*args, **kwargs) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 76, in do_call exit_code = getattr(module, func_name)(args, parser) File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 146, in solve_final_state specs_from_history_map = History(self.prefix).get_requested_specs_map() File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in get_requested_specs_map spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in <genexpr> spec_map.update(((s.name, s) for s in update_specs)) File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 186, in <genexpr> update_specs = (MatchSpec(spec) for spec in request.get('update_specs', ())) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 39, in __call__ parsed = _parse_spec_str(spec_arg) File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 556, in _parse_spec_str raise CondaValueError("Invalid MatchSpec: %s" % spec_str) conda.exceptions.CondaValueError: Invalid MatchSpec: <2.0
conda.exceptions.CondaValueError
def cast(val, typ): log = logging.getLogger(__name__) log.debug((val, typ)) if " or " in typ: for t in typ.split(" or "): try: return cast(val, t) except TqdmTypeError: pass raise TqdmTypeError(val + " : " + typ) # sys.stderr.write('\ndebug | `val:type`: `' + val + ':' + typ + '`.\n') if typ == "bool": if (val == "True") or (val == ""): return True elif val == "False": return False else: raise TqdmTypeError(val + " : " + typ) try: return eval(typ + '("' + val + '")') except: if typ == "chr": return chr(ord(eval('"' + val + '"'))) else: raise TqdmTypeError(val + " : " + typ)
def cast(val, typ): # sys.stderr.write('\ndebug | `val:type`: `' + val + ':' + typ + '`.\n') if typ == "bool": if (val == "True") or (val == ""): return True elif val == "False": return False else: raise TqdmTypeError(val + " : " + typ) try: return eval(typ + '("' + val + '")') except: if typ == "chr": return chr(ord(eval('"' + val + '"'))) else: raise TqdmTypeError(val + " : " + typ)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def posix_pipe( fin, fout, delim="\n", buf_size=256, callback=lambda int: None, # pragma: no cover ): """ Params ------ fin : file with `read(buf_size : int)` method fout : file with `write` (and optionally `flush`) methods. callback : function(int), e.g.: `tqdm.update` """ fp_write = fout.write # tmp = '' if not delim: while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: getattr(fout, "flush", lambda: None)() # pragma: no cover return fp_write(tmp) callback(len(tmp)) # return buf = "" # n = 0 while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: if buf: fp_write(buf) callback(1 + buf.count(delim)) # n += 1 + buf.count(delim) getattr(fout, "flush", lambda: None)() # pragma: no cover return # n while True: try: i = tmp.index(delim) except ValueError: buf += tmp break else: fp_write(buf + tmp[: i + len(delim)]) callback(1) # n += 1 buf = "" tmp = tmp[i + len(delim) :]
def posix_pipe( fin, fout, delim="\n", buf_size=256, callback=lambda int: None, # pragma: no cover ): """ Params ------ fin : file with `read(buf_size : int)` method fout : file with `write` (and optionally `flush`) methods. callback : function(int), e.g.: `tqdm.update` """ fp_write = fout.write tmp = "" if not delim: while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: getattr(fout, "flush", lambda: None)() # pragma: no cover return fp_write(tmp) callback(len(tmp)) return buf = "" # n = 0 while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: if buf: fp_write(buf) callback(1 + buf.count(delim)) # n += 1 + buf.count(delim) getattr(fout, "flush", lambda: None)() # pragma: no cover return # n while True: try: i = tmp.index(delim) except ValueError: buf += tmp break else: fp_write(buf + tmp[: i + len(delim)]) callback(1) # n += 1 buf = "" tmp = tmp[i + len(delim) :]
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def main(fp=sys.stderr): """ Paramters (internal use only) --------- fp : file-like object for tqdm """ try: log = sys.argv.index("--log") except ValueError: logLevel = "INFO" else: # sys.argv.pop(log) # logLevel = sys.argv.pop(log) logLevel = sys.argv[log + 1] logging.basicConfig( level=getattr(logging, logLevel), format="%(levelname)s:%(module)s:%(lineno)d:%(message)s", ) log = logging.getLogger(__name__) d = tqdm.__init__.__doc__ + CLI_EXTRA_DOC opt_types = dict(RE_OPTS.findall(d)) # opt_types['delim'] = 'chr' for o in UNSUPPORTED_OPTS: opt_types.pop(o) log.debug(sorted(opt_types.items())) # d = RE_OPTS.sub(r' --\1=<\1> : \2', d) split = RE_OPTS.split(d) opt_types_desc = zip(split[1::3], split[2::3], split[3::3]) d = "".join( "\n --{0}=<{0}> : {1}{2}".format(*otd) for otd in opt_types_desc if otd[0] not in UNSUPPORTED_OPTS ) d = ( """Usage: tqdm [--help | options] Options: -h, --help Print this help and exit -v, --version Print version and exit """ + d.strip("\n") + "\n" ) # opts = docopt(d, version=__version__) if any(v in sys.argv for v in ("-v", "--version")): sys.stdout.write(__version__ + "\n") sys.exit(0) elif any(v in sys.argv for v in ("-h", "--help")): sys.stdout.write(d + "\n") sys.exit(0) argv = RE_SHLEX.split(" ".join(["tqdm"] + sys.argv[1:])) opts = dict(zip(argv[1::2], argv[2::2])) log.debug(opts) opts.pop("log", True) tqdm_args = {"file": fp} try: for o, v in opts.items(): try: tqdm_args[o] = cast(v, opt_types[o]) except KeyError as e: raise TqdmKeyError(str(e)) log.debug("args:" + str(tqdm_args)) except: fp.write("\nError:\nUsage:\n tqdm [--help | options]\n") for i in sys.stdin: sys.stdout.write(i) raise else: buf_size = tqdm_args.pop("buf_size", 256) delim = tqdm_args.pop("delim", "\n") delim_per_char = tqdm_args.pop("bytes", False) if delim_per_char: tqdm_args.setdefault("unit", "B") tqdm_args.setdefault("unit_scale", True) tqdm_args.setdefault("unit_divisor", 1024) log.debug(tqdm_args) with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, "", buf_size, t.update) elif delim == "\n": log.debug(tqdm_args) for i in tqdm(sys.stdin, **tqdm_args): sys.stdout.write(i) else: log.debug(tqdm_args) with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, delim, buf_size, t.update)
def main(fp=sys.stderr): """ Paramters (internal use only) --------- fp : file-like object for tqdm """ d = tqdm.__init__.__doc__ + CLI_EXTRA_DOC opt_types = dict(RE_OPTS.findall(d)) for o in UNSUPPORTED_OPTS: opt_types.pop(o) # d = RE_OPTS.sub(r' --\1=<\1> : \2', d) split = RE_OPTS.split(d) opt_types_desc = zip(split[1::3], split[2::3], split[3::3]) d = "".join( "\n --{0}=<{0}> : {1}{2}".format(*otd) for otd in opt_types_desc if otd[0] not in UNSUPPORTED_OPTS ) d = ( """Usage: tqdm [--help | options] Options: -h, --help Print this help and exit -v, --version Print version and exit """ + d.strip("\n") + "\n" ) # opts = docopt(d, version=__version__) if any(v in sys.argv for v in ("-v", "--version")): sys.stdout.write(__version__ + "\n") sys.exit(0) elif any(v in sys.argv for v in ("-h", "--help")): sys.stdout.write(d + "\n") sys.exit(0) argv = RE_SHLEX.split(" ".join(sys.argv)) opts = dict(zip(argv[1::2], argv[2::2])) tqdm_args = {"file": fp} try: for o, v in opts.items(): try: tqdm_args[o] = cast(v, opt_types[o]) except KeyError as e: raise TqdmKeyError(str(e)) # fp.write('\ndebug | args: ' + str(tqdm_args) + '\n') except: fp.write("\nError:\nUsage:\n tqdm [--help | options]\n") for i in sys.stdin: sys.stdout.write(i) raise else: buf_size = tqdm_args.pop("buf_size", 256) delim = tqdm_args.pop("delim", "\n") delim_per_char = tqdm_args.pop("bytes", False) if delim_per_char: with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, "", buf_size, t.update) elif delim == "\n": for i in tqdm(sys.stdin, **tqdm_args): sys.stdout.write(i) else: with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, delim, buf_size, t.update)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def format_sizeof(num, suffix="", divisor=1000): """ Formats a number (greater than unity) with SI Order of Magnitude prefixes. Parameters ---------- num : float Number ( >= 1) to format. suffix : str, optional Post-postfix [default: '']. divisor : float, optionl Divisor between prefixes [default: 1000]. Returns ------- out : str Number with Order of Magnitude SI unit postfix. """ for unit in ["", "k", "M", "G", "T", "P", "E", "Z"]: if abs(num) < 999.95: if abs(num) < 99.95: if abs(num) < 9.995: return "{0:1.2f}".format(num) + unit + suffix return "{0:2.1f}".format(num) + unit + suffix return "{0:3.0f}".format(num) + unit + suffix num /= divisor return "{0:3.1f}Y".format(num) + suffix
def format_sizeof(num, suffix="", divisor=1000): """ Formats a number (greater than unity) with SI Order of Magnitude prefixes. Parameters ---------- num : float Number ( >= 1) to format. suffix : str, optional Post-postfix [default: '']. divisor : float, optionl Divisor between prefixes [default: 1000]. Returns ------- out : str Number with Order of Magnitude SI unit postfix. """ for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]: if abs(num) < 999.95: if abs(num) < 99.95: if abs(num) < 9.995: return "{0:1.2f}".format(num) + unit + suffix return "{0:2.1f}".format(num) + unit + suffix return "{0:3.0f}".format(num) + unit + suffix num /= divisor return "{0:3.1f}Y".format(num) + suffix
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def format_meter( n, total, elapsed, ncols=None, prefix="", ascii=False, unit="it", unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, ): """ Return a string-based progress bar given some parameters Parameters ---------- n : int Number of finished iterations. total : int The expected total number of iterations. If meaningless (), only basic progress statistics are displayed (no ETA). elapsed : float Number of seconds passed since start. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progress meter to stay within this bound [default: None]. The fallback meter width is 10 for the progress bar + no limit for the iterations counter and statistics. If 0, will not print any meter (only stats). prefix : str, optional Prefix message (included in total width) [default: '']. Use as {desc} in bar_format string. ascii : bool, optional If not set, use unicode (smooth blocks) to fill the meter [default: False]. The fallback is to use ASCII characters (1-9 #). unit : str, optional The iteration unit [default: 'it']. unit_scale : bool or int or float, optional If 1 or True, the number of iterations will be printed with an appropriate SI metric prefix (k = 10^3, M = 10^6, etc.) [default: False]. If any other non-zero number, will scale `total` and `n`. rate : float, optional Manual override for iteration rate. If [default: None], uses n/elapsed. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar='{desc}: {percentage:3.0f}%|' and r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. Note that a trailing ": " is automatically removed after {desc} if the latter is empty. postfix : *, optional Similar to `prefix`, but placed at the end (e.g. for additional stats). Note: postfix is usually a string (not a dict) for this method, and will if possible be set to postfix = ', ' + postfix. However other types are supported (#382). unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. Returns ------- out : Formatted meter and stats, ready to display. """ # sanity check: total if total and n > total: total = None # apply custom scale if necessary if unit_scale and unit_scale not in (True, 1): total *= unit_scale n *= unit_scale unit_scale = False format_interval = tqdm.format_interval elapsed_str = format_interval(elapsed) # if unspecified, attempt to use rate = average speed # (we allow manual override since predicting time is an arcane art) if rate is None and elapsed: rate = n / elapsed inv_rate = 1 / rate if rate else None format_sizeof = tqdm.format_sizeof rate_noinv_fmt = ( ( (format_sizeof(rate) if unit_scale else "{0:5.2f}".format(rate)) if rate else "?" ) + unit + "/s" ) rate_inv_fmt = ( ( (format_sizeof(inv_rate) if unit_scale else "{0:5.2f}".format(inv_rate)) if inv_rate else "?" ) + "s/" + unit ) rate_fmt = rate_inv_fmt if inv_rate and inv_rate > 1 else rate_noinv_fmt if unit_scale: n_fmt = format_sizeof(n, divisor=unit_divisor) total_fmt = format_sizeof(total, divisor=unit_divisor) if total else None else: n_fmt = str(n) total_fmt = str(total) try: postfix = ", " + postfix if postfix else "" except TypeError: pass # total is known: we can predict some stats if total: # fractional and percentage progress frac = n / total percentage = frac * 100 remaining_str = format_interval((total - n) / rate) if rate else "?" # format the stats displayed to the left and right sides of the bar if prefix: # old prefix setup work around bool_prefix_colon_already = prefix[-2:] == ": " l_bar = prefix if bool_prefix_colon_already else prefix + ": " else: l_bar = "" l_bar += "{0:3.0f}%|".format(percentage) r_bar = "| {0}/{1} [{2}<{3}, {4}{5}]".format( n_fmt, total_fmt, elapsed_str, remaining_str, rate_fmt, postfix ) if ncols == 0: return l_bar[:-1] + r_bar[1:] if bar_format: # Custom bar formatting # Populate a dict with all available progress indicators bar_args = { "n": n, "n_fmt": n_fmt, "total": total, "total_fmt": total_fmt, "percentage": percentage, "rate": inv_rate if inv_rate and inv_rate > 1 else rate, "rate_fmt": rate_fmt, "rate_noinv": rate, "rate_noinv_fmt": rate_noinv_fmt, "rate_inv": inv_rate, "rate_inv_fmt": rate_inv_fmt, "elapsed": elapsed_str, "remaining": remaining_str, "l_bar": l_bar, "r_bar": r_bar, "desc": prefix or "", "postfix": postfix, # 'bar': full_bar # replaced by procedure below } # auto-remove colon for empty `desc` if not prefix: bar_format = bar_format.replace("{desc}: ", "") # Interpolate supplied bar format with the dict if "{bar}" in bar_format: # Format left/right sides of the bar, and format the bar # later in the remaining space (avoid breaking display) l_bar_user, r_bar_user = bar_format.split("{bar}") l_bar = l_bar_user.format(**bar_args) r_bar = r_bar_user.format(**bar_args) else: # Else no progress bar, we can just format and return return bar_format.format(**bar_args) # Formatting progress bar # space available for bar's display N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols else 10 # format bar depending on availability of unicode/ascii chars if ascii: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 10), 10) bar = "#" * bar_length frac_bar = chr(48 + frac_bar_length) if frac_bar_length else " " else: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8) bar = _unich(0x2588) * bar_length frac_bar = _unich(0x2590 - frac_bar_length) if frac_bar_length else " " # whitespace padding if bar_length < N_BARS: full_bar = bar + frac_bar + " " * max(N_BARS - bar_length - 1, 0) else: full_bar = bar + " " * max(N_BARS - bar_length, 0) # Piece together the bar parts return l_bar + full_bar + r_bar # no total: no progressbar, ETA, just progress stats else: return ((prefix + ": ") if prefix else "") + "{0}{1} [{2}, {3}{4}]".format( n_fmt, unit, elapsed_str, rate_fmt, postfix )
def format_meter( n, total, elapsed, ncols=None, prefix="", ascii=False, unit="it", unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, ): """ Return a string-based progress bar given some parameters Parameters ---------- n : int Number of finished iterations. total : int The expected total number of iterations. If meaningless (), only basic progress statistics are displayed (no ETA). elapsed : float Number of seconds passed since start. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progress meter to stay within this bound [default: None]. The fallback meter width is 10 for the progress bar + no limit for the iterations counter and statistics. If 0, will not print any meter (only stats). prefix : str, optional Prefix message (included in total width) [default: '']. ascii : bool, optional If not set, use unicode (smooth blocks) to fill the meter [default: False]. The fallback is to use ASCII characters (1-9 #). unit : str, optional The iteration unit [default: 'it']. unit_scale : bool, optional If set, the number of iterations will printed with an appropriate SI metric prefix (K = 10^3, M = 10^6, etc.) [default: False]. rate : float, optional Manual override for iteration rate. If [default: None], uses n/elapsed. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar is '{desc}{percentage:3.0f}%|' and r_bar is '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' Possible vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. postfix : str, optional Same as prefix but will be placed at the end as additional stats. unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. Returns ------- out : Formatted meter and stats, ready to display. """ # sanity check: total if total and n > total: total = None format_interval = tqdm.format_interval elapsed_str = format_interval(elapsed) # if unspecified, attempt to use rate = average speed # (we allow manual override since predicting time is an arcane art) if rate is None and elapsed: rate = n / elapsed inv_rate = 1 / rate if (rate and (rate < 1)) else None format_sizeof = tqdm.format_sizeof rate_fmt = ( ( ( format_sizeof(inv_rate if inv_rate else rate) if unit_scale else "{0:5.2f}".format(inv_rate if inv_rate else rate) ) if rate else "?" ) + ("s" if inv_rate else unit) + "/" + (unit if inv_rate else "s") ) if unit_scale: n_fmt = format_sizeof(n, divisor=unit_divisor) total_fmt = format_sizeof(total, divisor=unit_divisor) if total else None else: n_fmt = str(n) total_fmt = str(total) # total is known: we can predict some stats if total: # fractional and percentage progress frac = n / total percentage = frac * 100 remaining_str = format_interval((total - n) / rate) if rate else "?" # format the stats displayed to the left and right sides of the bar l_bar = (prefix if prefix else "") + "{0:3.0f}%|".format(percentage) r_bar = "| {0}/{1} [{2}<{3}, {4}{5}]".format( n_fmt, total_fmt, elapsed_str, remaining_str, rate_fmt, ", " + postfix if postfix else "", ) if ncols == 0: return l_bar[:-1] + r_bar[1:] if bar_format: # Custom bar formatting # Populate a dict with all available progress indicators bar_args = { "n": n, "n_fmt": n_fmt, "total": total, "total_fmt": total_fmt, "percentage": percentage, "rate": rate if inv_rate is None else inv_rate, "rate_noinv": rate, "rate_noinv_fmt": ( (format_sizeof(rate) if unit_scale else "{0:5.2f}".format(rate)) if rate else "?" ) + unit + "/s", "rate_fmt": rate_fmt, "elapsed": elapsed_str, "remaining": remaining_str, "l_bar": l_bar, "r_bar": r_bar, "desc": prefix if prefix else "", "postfix": ", " + postfix if postfix else "", # 'bar': full_bar # replaced by procedure below } # Interpolate supplied bar format with the dict if "{bar}" in bar_format: # Format left/right sides of the bar, and format the bar # later in the remaining space (avoid breaking display) l_bar_user, r_bar_user = bar_format.split("{bar}") l_bar = l_bar_user.format(**bar_args) r_bar = r_bar_user.format(**bar_args) else: # Else no progress bar, we can just format and return return bar_format.format(**bar_args) # Formatting progress bar # space available for bar's display N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols else 10 # format bar depending on availability of unicode/ascii chars if ascii: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 10), 10) bar = "#" * bar_length frac_bar = chr(48 + frac_bar_length) if frac_bar_length else " " else: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8) bar = _unich(0x2588) * bar_length frac_bar = _unich(0x2590 - frac_bar_length) if frac_bar_length else " " # whitespace padding if bar_length < N_BARS: full_bar = bar + frac_bar + " " * max(N_BARS - bar_length - 1, 0) else: full_bar = bar + " " * max(N_BARS - bar_length, 0) # Piece together the bar parts return l_bar + full_bar + r_bar # no total: no progressbar, ETA, just progress stats else: return (prefix if prefix else "") + "{0}{1} [{2}, {3}{4}]".format( n_fmt, unit, elapsed_str, rate_fmt, ", " + postfix if postfix else "" )
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __new__(cls, *args, **kwargs): # Create a new instance instance = object.__new__(cls) # Add to the list of instances if "_instances" not in cls.__dict__: cls._instances = WeakSet() if "_lock" not in cls.__dict__: cls._lock = TqdmDefaultWriteLock() with cls._lock: cls._instances.add(instance) # Create the monitoring thread if cls.monitor_interval and (cls.monitor is None or not cls.monitor.report()): try: cls.monitor = TMonitor(cls, cls.monitor_interval) except Exception as e: # pragma: nocover warn( "tqdm:disabling monitor support" " (monitor_interval = 0) due to:\n" + str(e), TqdmMonitorWarning, ) cls.monitor_interval = 0 # Return the instance return instance
def __new__(cls, *args, **kwargs): # Create a new instance instance = object.__new__(cls) # Add to the list of instances if "_instances" not in cls.__dict__: cls._instances = WeakSet() cls._instances.add(instance) # Create the monitoring thread if cls.monitor_interval and (cls.monitor is None or not cls.monitor.report()): cls.monitor = TMonitor(cls, cls.monitor_interval) # Return the instance return instance
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _get_free_pos(cls, instance=None): """Skips specified instance""" positions = set(abs(inst.pos) for inst in cls._instances if inst is not instance) return min(set(range(len(positions) + 1)).difference(positions))
def _get_free_pos(cls, instance=None): """Skips specified instance""" try: return max(inst.pos for inst in cls._instances if inst is not instance) + 1 except ValueError as e: if "arg is an empty sequence" in str(e): return 0 raise # pragma: no cover
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _decr_instances(cls, instance): """ Remove from list and reposition other bars so that newer bars won't overlap previous bars """ with cls._lock: try: cls._instances.remove(instance) except KeyError: if not instance.gui: # pragma: no cover raise else: for inst in cls._instances: # negative `pos` means fixed if inst.pos > abs(instance.pos): inst.pos -= 1 # TODO: check this doesn't overwrite another fixed bar # Kill monitor if no instances are left if not cls._instances and cls.monitor: try: cls.monitor.exit() del cls.monitor except AttributeError: # pragma: nocover pass else: cls.monitor = None
def _decr_instances(cls, instance): """ Remove from list and reposition other bars so that newer bars won't overlap previous bars """ try: # in case instance was explicitly positioned, it won't be in set cls._instances.remove(instance) for inst in cls._instances: if inst.pos > instance.pos: inst.pos -= 1 # Kill monitor if no instances are left if not cls._instances and cls.monitor: cls.monitor.exit() try: del cls.monitor except AttributeError: pass cls.monitor = None except KeyError: pass
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def write(cls, s, file=None, end="\n", nolock=False): """ Print a message via tqdm (without overlap with bars) """ fp = file if file is not None else sys.stdout with cls.external_write_mode(file=file, nolock=nolock): # Write the message fp.write(s) fp.write(end)
def write(cls, s, file=None, end="\n"): """ Print a message via tqdm (without overlap with bars) """ fp = file if file is not None else sys.stdout # Clear all bars inst_cleared = [] for inst in getattr(cls, "_instances", []): # Clear instance if in the target output file # or if write output + tqdm output are both either # sys.stdout or sys.stderr (because both are mixed in terminal) if inst.fp == fp or all(f in (sys.stdout, sys.stderr) for f in (fp, inst.fp)): inst.clear() inst_cleared.append(inst) # Write the message fp.write(s) fp.write(end) # Force refresh display of bars we cleared for inst in inst_cleared: # Avoid race conditions by checking that the instance started if hasattr(inst, "start_t"): # pragma: nocover inst.refresh()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def pandas(tclass, *targs, **tkwargs): """ Registers the given `tqdm` class with pandas.core. ( frame.DataFrame | series.Series | groupby.DataFrameGroupBy | groupby.SeriesGroupBy ).progress_apply A new instance will be create every time `progress_apply` is called, and each instance will automatically close() upon completion. Parameters ---------- targs, tkwargs : arguments for the tqdm instance Examples -------- >>> import pandas as pd >>> import numpy as np >>> from tqdm import tqdm, tqdm_gui >>> >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc >>> # Now you can use `progress_apply` instead of `apply` >>> df.groupby(0).progress_apply(lambda x: x**2) References ---------- https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python """ from pandas.core.frame import DataFrame from pandas.core.series import Series from pandas.core.groupby import DataFrameGroupBy from pandas.core.groupby import SeriesGroupBy from pandas.core.groupby import GroupBy from pandas.core.groupby import PanelGroupBy from pandas import Panel deprecated_t = [tkwargs.pop("deprecated_t", None)] def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner # Monkeypatch pandas to provide easy methods # Enable custom tqdm progress in pandas! Series.progress_apply = inner_generator() SeriesGroupBy.progress_apply = inner_generator() Series.progress_map = inner_generator("map") SeriesGroupBy.progress_map = inner_generator("map") DataFrame.progress_apply = inner_generator() DataFrameGroupBy.progress_apply = inner_generator() DataFrame.progress_applymap = inner_generator("applymap") Panel.progress_apply = inner_generator() PanelGroupBy.progress_apply = inner_generator() GroupBy.progress_apply = inner_generator() GroupBy.progress_aggregate = inner_generator("aggregate") GroupBy.progress_transform = inner_generator("transform")
def pandas(tclass, *targs, **tkwargs): """ Registers the given `tqdm` class with pandas.core. ( frame.DataFrame | series.Series | groupby.DataFrameGroupBy | groupby.SeriesGroupBy ).progress_apply A new instance will be create every time `progress_apply` is called, and each instance will automatically close() upon completion. Parameters ---------- targs, tkwargs : arguments for the tqdm instance Examples -------- >>> import pandas as pd >>> import numpy as np >>> from tqdm import tqdm, tqdm_gui >>> >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc >>> # Now you can use `progress_apply` instead of `apply` >>> df.groupby(0).progress_apply(lambda x: x**2) References ---------- https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python """ from pandas.core.frame import DataFrame from pandas.core.series import Series from pandas.core.groupby import DataFrameGroupBy from pandas.core.groupby import SeriesGroupBy from pandas.core.groupby import GroupBy from pandas.core.groupby import PanelGroupBy from pandas import Panel deprecated_t = [tkwargs.pop("deprecated_t", None)] def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner # Monkeypatch pandas to provide easy methods # Enable custom tqdm progress in pandas! Series.progress_apply = inner_generator() SeriesGroupBy.progress_apply = inner_generator() Series.progress_map = inner_generator("map") SeriesGroupBy.progress_map = inner_generator("map") DataFrame.progress_apply = inner_generator() DataFrameGroupBy.progress_apply = inner_generator() DataFrame.progress_applymap = inner_generator("applymap") Panel.progress_apply = inner_generator() PanelGroupBy.progress_apply = inner_generator() GroupBy.progress_apply = inner_generator() GroupBy.progress_aggregate = inner_generator("aggregate") GroupBy.progress_transform = inner_generator("transform")
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner
def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result
def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs)
def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __init__( self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit="it", unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, gui=False, **kwargs, ): """ Parameters ---------- iterable : iterable, optional Iterable to decorate with a progressbar. Leave blank to manually manage the updates. desc : str, optional Prefix for the progressbar. total : int, optional The number of expected iterations. If unspecified, len(iterable) is used if possible. As a last resort, only basic progress statistics are displayed (no ETA, no progressbar). If `gui` is True and this parameter needs subsequent updating, specify an initial arbitrary large positive integer, e.g. int(9e9). leave : bool, optional If [default: True], keeps all traces of the progressbar upon termination of iteration. file : `io.TextIOWrapper` or `io.StringIO`, optional Specifies where to output the progress messages (default: sys.stderr). Uses `file.write(str)` and `file.flush()` methods. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progressbar to stay within this bound. If unspecified, attempts to use environment width. The fallback is a meter width of 10 and no limit for the counter and statistics. If 0, will not print any meter (only stats). mininterval : float, optional Minimum progress display update interval, in seconds [default: 0.1]. maxinterval : float, optional Maximum progress display update interval, in seconds [default: 10]. Automatically adjusts `miniters` to correspond to `mininterval` after long display update lag. Only works if `dynamic_miniters` or monitor thread is enabled. miniters : int, optional Minimum progress display update interval, in iterations. If 0 and `dynamic_miniters`, will automatically adjust to equal `mininterval` (more CPU efficient, good for tight loops). If > 0, will skip display of specified number of iterations. Tweak this and `mininterval` to get very efficient loops. If your progress is erratic with both fast and slow iterations (network, skipping items, etc) you should set miniters=1. ascii : bool, optional If unspecified or False, use unicode (smooth blocks) to fill the meter. The fallback is to use ASCII characters `1-9 #`. disable : bool, optional Whether to disable the entire progressbar wrapper [default: False]. If set to None, disable on non-TTY. unit : str, optional String that will be used to define the unit of each iteration [default: it]. unit_scale : bool or int or float, optional If 1 or True, the number of iterations will be reduced/scaled automatically and a metric prefix following the International System of Units standard will be added (kilo, mega, etc.) [default: False]. If any other non-zero number, will scale `total` and `n`. dynamic_ncols : bool, optional If set, constantly alters `ncols` to the environment (allowing for window resizes) [default: False]. smoothing : float, optional Exponential moving average smoothing factor for speed estimates (ignored in GUI mode). Ranges from 0 (average speed) to 1 (current/instantaneous speed) [default: 0.3]. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar='{desc}: {percentage:3.0f}%|' and r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. Note that a trailing ": " is automatically removed after {desc} if the latter is empty. initial : int, optional The initial counter value. Useful when restarting a progress bar [default: 0]. position : int, optional Specify the line offset to print this bar (starting from 0) Automatic if unspecified. Useful to manage multiple bars at once (eg, from threads). postfix : dict or *, optional Specify additional stats to display at the end of the bar. Calls `set_postfix(**postfix)` if possible (dict). unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. gui : bool, optional WARNING: internal parameter - do not use. Use tqdm_gui(...) instead. If set, will attempt to use matplotlib animations for a graphical output [default: False]. Returns ------- out : decorated iterator. """ if file is None: file = sys.stderr if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True if disable: self.iterable = iterable self.disable = disable self.pos = self._get_free_pos(self) self._instances.remove(self) self.n = initial return if kwargs: self.disable = True self.pos = self._get_free_pos(self) self._instances.remove(self) raise ( TqdmDeprecationWarning( """\ `nested` is deprecated and automated. Use position instead for manual control. """, fp_write=getattr(file, "write", sys.stderr.write), ) if "nested" in kwargs else TqdmKeyError("Unknown argument(s): " + str(kwargs)) ) # Preprocess the arguments if total is None and iterable is not None: try: total = len(iterable) except (TypeError, AttributeError): total = None if ( (ncols is None) and (file in (sys.stderr, sys.stdout)) ) or dynamic_ncols: # pragma: no cover if dynamic_ncols: dynamic_ncols = _environ_cols_wrapper() if dynamic_ncols: ncols = dynamic_ncols(file) # elif ncols is not None: # ncols = 79 else: _dynamic_ncols = _environ_cols_wrapper() if _dynamic_ncols: ncols = _dynamic_ncols(file) # else: # ncols = 79 if miniters is None: miniters = 0 dynamic_miniters = True else: dynamic_miniters = False if mininterval is None: mininterval = 0 if maxinterval is None: maxinterval = 0 if ascii is None: ascii = not _supports_unicode(file) if bar_format and not ascii: # Convert bar format into unicode since terminal uses unicode bar_format = _unicode(bar_format) if smoothing is None: smoothing = 0 # Store the arguments self.iterable = iterable self.desc = desc or "" self.total = total self.leave = leave self.fp = file self.ncols = ncols self.mininterval = mininterval self.maxinterval = maxinterval self.miniters = miniters self.dynamic_miniters = dynamic_miniters self.ascii = ascii self.disable = disable self.unit = unit self.unit_scale = unit_scale self.unit_divisor = unit_divisor self.gui = gui self.dynamic_ncols = dynamic_ncols self.smoothing = smoothing self.avg_time = None self._time = time self.bar_format = bar_format self.postfix = None if postfix: try: self.set_postfix(refresh=False, **postfix) except TypeError: self.postfix = postfix # Init the iterations counters self.last_print_n = initial self.n = initial # if nested, at initial sp() call we replace '\r' by '\n' to # not overwrite the outer progress bar if position is None: self.pos = self._get_free_pos(self) else: # mark fixed positions as negative self.pos = -position if not gui: # Initialize the screen printer self.sp = self.status_printer(self.fp) with self._lock: if self.pos: self.moveto(abs(self.pos)) self.sp(self.__repr__(elapsed=0)) if self.pos: self.moveto(-abs(self.pos)) # Init the time counter self.last_print_t = self._time() # NB: Avoid race conditions by setting start_t at the very end of init self.start_t = self.last_print_t
def __init__( self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit="it", unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, gui=False, **kwargs, ): """ Parameters ---------- iterable : iterable, optional Iterable to decorate with a progressbar. Leave blank to manually manage the updates. desc : str, optional Prefix for the progressbar. total : int, optional The number of expected iterations. If unspecified, len(iterable) is used if possible. As a last resort, only basic progress statistics are displayed (no ETA, no progressbar). If `gui` is True and this parameter needs subsequent updating, specify an initial arbitrary large positive integer, e.g. int(9e9). leave : bool, optional If [default: True], keeps all traces of the progressbar upon termination of iteration. file : `io.TextIOWrapper` or `io.StringIO`, optional Specifies where to output the progress messages (default: sys.stderr). Uses `file.write(str)` and `file.flush()` methods. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progressbar to stay within this bound. If unspecified, attempts to use environment width. The fallback is a meter width of 10 and no limit for the counter and statistics. If 0, will not print any meter (only stats). mininterval : float, optional Minimum progress display update interval, in seconds [default: 0.1]. maxinterval : float, optional Maximum progress display update interval, in seconds [default: 10]. Automatically adjusts `miniters` to correspond to `mininterval` after long display update lag. Only works if `dynamic_miniters` or monitor thread is enabled. miniters : int, optional Minimum progress display update interval, in iterations. If 0 and `dynamic_miniters`, will automatically adjust to equal `mininterval` (more CPU efficient, good for tight loops). If > 0, will skip display of specified number of iterations. Tweak this and `mininterval` to get very efficient loops. If your progress is erratic with both fast and slow iterations (network, skipping items, etc) you should set miniters=1. ascii : bool, optional If unspecified or False, use unicode (smooth blocks) to fill the meter. The fallback is to use ASCII characters `1-9 #`. disable : bool, optional Whether to disable the entire progressbar wrapper [default: False]. If set to None, disable on non-TTY. unit : str, optional String that will be used to define the unit of each iteration [default: it]. unit_scale : bool, optional If set, the number of iterations will be reduced/scaled automatically and a metric prefix following the International System of Units standard will be added (kilo, mega, etc.) [default: False]. dynamic_ncols : bool, optional If set, constantly alters `ncols` to the environment (allowing for window resizes) [default: False]. smoothing : float, optional Exponential moving average smoothing factor for speed estimates (ignored in GUI mode). Ranges from 0 (average speed) to 1 (current/instantaneous speed) [default: 0.3]. bar_format : str, optional Specify a custom bar string formatting. May impact performance. If unspecified, will use '{l_bar}{bar}{r_bar}', where l_bar is '{desc}{percentage:3.0f}%|' and r_bar is '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' Possible vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. initial : int, optional The initial counter value. Useful when restarting a progress bar [default: 0]. position : int, optional Specify the line offset to print this bar (starting from 0) Automatic if unspecified. Useful to manage multiple bars at once (eg, from threads). postfix : dict, optional Specify additional stats to display at the end of the bar. unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. gui : bool, optional WARNING: internal parameter - do not use. Use tqdm_gui(...) instead. If set, will attempt to use matplotlib animations for a graphical output [default: False]. Returns ------- out : decorated iterator. """ if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True if disable: self.iterable = iterable self.disable = disable self.pos = self._get_free_pos(self) self._instances.remove(self) return if file is None: file = sys.stderr if kwargs: self.disable = True self.pos = self._get_free_pos(self) self._instances.remove(self) raise ( TqdmDeprecationWarning( """\ `nested` is deprecated and automated. Use position instead for manual control. """, fp_write=getattr(file, "write", sys.stderr.write), ) if "nested" in kwargs else TqdmKeyError("Unknown argument(s): " + str(kwargs)) ) # Preprocess the arguments if total is None and iterable is not None: try: total = len(iterable) except (TypeError, AttributeError): total = None if ( (ncols is None) and (file in (sys.stderr, sys.stdout)) ) or dynamic_ncols: # pragma: no cover if dynamic_ncols: dynamic_ncols = _environ_cols_wrapper() if dynamic_ncols: ncols = dynamic_ncols(file) # elif ncols is not None: # ncols = 79 else: _dynamic_ncols = _environ_cols_wrapper() if _dynamic_ncols: ncols = _dynamic_ncols(file) # else: # ncols = 79 if miniters is None: miniters = 0 dynamic_miniters = True else: dynamic_miniters = False if mininterval is None: mininterval = 0 if maxinterval is None: maxinterval = 0 if ascii is None: ascii = not _supports_unicode(file) if bar_format and not ascii: # Convert bar format into unicode since terminal uses unicode bar_format = _unicode(bar_format) if smoothing is None: smoothing = 0 # Store the arguments self.iterable = iterable self.desc = desc + ": " if desc else "" self.total = total self.leave = leave self.fp = file self.ncols = ncols self.mininterval = mininterval self.maxinterval = maxinterval self.miniters = miniters self.dynamic_miniters = dynamic_miniters self.ascii = ascii self.disable = disable self.unit = unit self.unit_scale = unit_scale self.unit_divisor = unit_divisor self.gui = gui self.dynamic_ncols = dynamic_ncols self.smoothing = smoothing self.avg_time = None self._time = time self.bar_format = bar_format self.postfix = None if postfix: self.set_postfix(**postfix) # Init the iterations counters self.last_print_n = initial self.n = initial # if nested, at initial sp() call we replace '\r' by '\n' to # not overwrite the outer progress bar if position is None: self.pos = self._get_free_pos(self) else: self.pos = position self._instances.remove(self) if not gui: # Initialize the screen printer self.sp = self.status_printer(self.fp) if self.pos: self.moveto(self.pos) self.sp( self.format_meter( self.n, total, 0, (dynamic_ncols(file) if dynamic_ncols else ncols), self.desc, ascii, unit, unit_scale, None, bar_format, self.postfix, unit_divisor, ) ) if self.pos: self.moveto(-self.pos) # Init the time counter self.last_print_t = self._time() # NB: Avoid race conditions by setting start_t at the very end of init self.start_t = self.last_print_t
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __repr__(self, elapsed=None): return self.format_meter( self.n, self.total, elapsed if elapsed is not None else self._time() - self.start_t, self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols, self.desc, self.ascii, self.unit, self.unit_scale, 1 / self.avg_time if self.avg_time else None, self.bar_format, self.postfix, self.unit_divisor, )
def __repr__(self): return self.format_meter( self.n, self.total, self._time() - self.start_t, self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols, self.desc, self.ascii, self.unit, self.unit_scale, 1 / self.avg_time if self.avg_time else None, self.bar_format, self.postfix, )
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __lt__(self, other): return abs(self.pos) < abs(other.pos)
def __lt__(self, other): return self.pos < other.pos
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __eq__(self, other): return abs(self.pos) == abs(other.pos)
def __eq__(self, other): return self.pos == other.pos
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __iter__(self): """Backward-compatibility to use: for x in tqdm(iterable)""" # Inlining instance variables as locals (speed optimisation) iterable = self.iterable # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: for obj in iterable: yield obj else: mininterval = self.mininterval maxinterval = self.maxinterval miniters = self.miniters dynamic_miniters = self.dynamic_miniters last_print_t = self.last_print_t last_print_n = self.last_print_n n = self.n smoothing = self.smoothing avg_time = self.avg_time _time = self._time try: sp = self.sp except AttributeError: raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) for obj in iterable: yield obj # Update and possibly print the progressbar. # Note: does not call self.update(1) for speed optimisation. n += 1 # check counter first to avoid calls to time() if n - last_print_n >= self.miniters: miniters = self.miniters # watch monitoring thread changes delta_t = _time() - last_print_t if delta_t >= mininterval: cur_t = _time() delta_it = n - last_print_n # EMA (not just overall average) if smoothing and delta_t and delta_it: avg_time = ( delta_t / delta_it if avg_time is None else smoothing * delta_t / delta_it + (1 - smoothing) * avg_time ) self.n = n with self._lock: if self.pos: self.moveto(abs(self.pos)) # Print bar update sp(self.__repr__()) if self.pos: self.moveto(-abs(self.pos)) # If no `miniters` was specified, adjust automatically # to the max iteration rate seen so far between 2 prints if dynamic_miniters: if maxinterval and delta_t >= maxinterval: # Adjust miniters to time interval by rule of 3 if mininterval: # Set miniters to correspond to mininterval miniters = delta_it * mininterval / delta_t else: # Set miniters to correspond to maxinterval miniters = delta_it * maxinterval / delta_t elif smoothing: # EMA-weight miniters to converge # towards the timeframe of mininterval miniters = ( smoothing * delta_it * ( mininterval / delta_t if mininterval and delta_t else 1 ) + (1 - smoothing) * miniters ) else: # Maximum nb of iterations between 2 prints miniters = max(miniters, delta_it) # Store old values for next call self.n = self.last_print_n = last_print_n = n self.last_print_t = last_print_t = cur_t self.miniters = miniters # Closing the progress bar. # Update some internal variables for close(). self.last_print_n = last_print_n self.n = n self.miniters = miniters self.close()
def __iter__(self): """Backward-compatibility to use: for x in tqdm(iterable)""" # Inlining instance variables as locals (speed optimisation) iterable = self.iterable # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: for obj in iterable: yield obj else: ncols = self.ncols mininterval = self.mininterval maxinterval = self.maxinterval miniters = self.miniters dynamic_miniters = self.dynamic_miniters unit = self.unit unit_scale = self.unit_scale unit_divisor = self.unit_divisor ascii = self.ascii start_t = self.start_t last_print_t = self.last_print_t last_print_n = self.last_print_n n = self.n dynamic_ncols = self.dynamic_ncols smoothing = self.smoothing avg_time = self.avg_time bar_format = self.bar_format _time = self._time format_meter = self.format_meter try: sp = self.sp except AttributeError: raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) for obj in iterable: yield obj # Update and print the progressbar. # Note: does not call self.update(1) for speed optimisation. n += 1 # check the counter first (avoid calls to time()) if n - last_print_n >= self.miniters: miniters = self.miniters # watch monitoring thread changes delta_t = _time() - last_print_t if delta_t >= mininterval: cur_t = _time() delta_it = n - last_print_n elapsed = cur_t - start_t # optimised if in inner loop # EMA (not just overall average) if smoothing and delta_t and delta_it: avg_time = ( delta_t / delta_it if avg_time is None else smoothing * delta_t / delta_it + (1 - smoothing) * avg_time ) if self.pos: self.moveto(self.pos) # Printing the bar's update sp( format_meter( n, self.total, elapsed, (dynamic_ncols(self.fp) if dynamic_ncols else ncols), self.desc, ascii, unit, unit_scale, 1 / avg_time if avg_time else None, bar_format, self.postfix, unit_divisor, ) ) if self.pos: self.moveto(-self.pos) # If no `miniters` was specified, adjust automatically # to the max iteration rate seen so far between 2 prints if dynamic_miniters: if maxinterval and delta_t >= maxinterval: # Adjust miniters to time interval by rule of 3 if mininterval: # Set miniters to correspond to mininterval miniters = delta_it * mininterval / delta_t else: # Set miniters to correspond to maxinterval miniters = delta_it * maxinterval / delta_t elif smoothing: # EMA-weight miniters to converge # towards the timeframe of mininterval miniters = ( smoothing * delta_it * ( mininterval / delta_t if mininterval and delta_t else 1 ) + (1 - smoothing) * miniters ) else: # Maximum nb of iterations between 2 prints miniters = max(miniters, delta_it) # Store old values for next call self.n = self.last_print_n = last_print_n = n self.last_print_t = last_print_t = cur_t self.miniters = miniters # Closing the progress bar. # Update some internal variables for close(). self.last_print_n = last_print_n self.n = n self.miniters = miniters self.close()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def update(self, n=1): """ Manually update the progress bar, useful for streams such as reading files. E.g.: >>> t = tqdm(total=filesize) # Initialise >>> for current_buffer in stream: ... ... ... t.update(len(current_buffer)) >>> t.close() The last line is highly recommended, but possibly not necessary if `t.update()` will be called in such a way that `filesize` will be exactly reached and printed. Parameters ---------- n : int, optional Increment to add to the internal counter of iterations [default: 1]. """ # N.B.: see __iter__() for more comments. if self.disable: return if n < 0: raise ValueError("n ({0}) cannot be negative".format(n)) self.n += n # check counter first to reduce calls to time() if self.n - self.last_print_n >= self.miniters: delta_t = self._time() - self.last_print_t if delta_t >= self.mininterval: cur_t = self._time() delta_it = self.n - self.last_print_n # >= n # elapsed = cur_t - self.start_t # EMA (not just overall average) if self.smoothing and delta_t and delta_it: self.avg_time = ( delta_t / delta_it if self.avg_time is None else self.smoothing * delta_t / delta_it + (1 - self.smoothing) * self.avg_time ) if not hasattr(self, "sp"): raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) with self._lock: if self.pos: self.moveto(abs(self.pos)) # Print bar update self.sp(self.__repr__()) if self.pos: self.moveto(-abs(self.pos)) # If no `miniters` was specified, adjust automatically to the # maximum iteration rate seen so far between two prints. # e.g.: After running `tqdm.update(5)`, subsequent # calls to `tqdm.update()` will only cause an update after # at least 5 more iterations. if self.dynamic_miniters: if self.maxinterval and delta_t >= self.maxinterval: if self.mininterval: self.miniters = delta_it * self.mininterval / delta_t else: self.miniters = delta_it * self.maxinterval / delta_t elif self.smoothing: self.miniters = ( self.smoothing * delta_it * ( self.mininterval / delta_t if self.mininterval and delta_t else 1 ) + (1 - self.smoothing) * self.miniters ) else: self.miniters = max(self.miniters, delta_it) # Store old values for next call self.last_print_n = self.n self.last_print_t = cur_t
def update(self, n=1): """ Manually update the progress bar, useful for streams such as reading files. E.g.: >>> t = tqdm(total=filesize) # Initialise >>> for current_buffer in stream: ... ... ... t.update(len(current_buffer)) >>> t.close() The last line is highly recommended, but possibly not necessary if `t.update()` will be called in such a way that `filesize` will be exactly reached and printed. Parameters ---------- n : int Increment to add to the internal counter of iterations [default: 1]. """ if self.disable: return if n < 0: raise ValueError("n ({0}) cannot be negative".format(n)) self.n += n if self.n - self.last_print_n >= self.miniters: # We check the counter first, to reduce the overhead of time() delta_t = self._time() - self.last_print_t if delta_t >= self.mininterval: cur_t = self._time() delta_it = self.n - self.last_print_n # should be n? # elapsed = cur_t - self.start_t # EMA (not just overall average) if self.smoothing and delta_t and delta_it: self.avg_time = ( delta_t / delta_it if self.avg_time is None else self.smoothing * delta_t / delta_it + (1 - self.smoothing) * self.avg_time ) if not hasattr(self, "sp"): raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) if self.pos: self.moveto(self.pos) # Print bar's update self.sp(self.__repr__()) if self.pos: self.moveto(-self.pos) # If no `miniters` was specified, adjust automatically to the # maximum iteration rate seen so far between two prints. # e.g.: After running `tqdm.update(5)`, subsequent # calls to `tqdm.update()` will only cause an update after # at least 5 more iterations. if self.dynamic_miniters: if self.maxinterval and delta_t >= self.maxinterval: if self.mininterval: self.miniters = delta_it * self.mininterval / delta_t else: self.miniters = delta_it * self.maxinterval / delta_t elif self.smoothing: self.miniters = ( self.smoothing * delta_it * ( self.mininterval / delta_t if self.mininterval and delta_t else 1 ) + (1 - self.smoothing) * self.miniters ) else: self.miniters = max(self.miniters, delta_it) # Store old values for next call self.last_print_n = self.n self.last_print_t = cur_t
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def close(self): """ Cleanup and (if leave=False) close the progressbar. """ if self.disable: return # Prevent multiple closures self.disable = True # decrement instance pos and remove from internal set pos = abs(self.pos) self._decr_instances(self) # GUI mode if not hasattr(self, "sp"): return # annoyingly, _supports_unicode isn't good enough def fp_write(s): self.fp.write(_unicode(s)) try: fp_write("") except ValueError as e: if "closed" in str(e): return raise # pragma: no cover with self._lock: if pos: self.moveto(pos) if self.leave: if self.last_print_n < self.n: # stats for overall rate (no weighted average) self.avg_time = None self.sp(self.__repr__()) if pos: self.moveto(-pos) else: fp_write("\n") else: self.sp("") # clear up last bar if pos: self.moveto(-pos) else: fp_write("\r")
def close(self): """ Cleanup and (if leave=False) close the progressbar. """ if self.disable: return # Prevent multiple closures self.disable = True # decrement instance pos and remove from internal set pos = self.pos self._decr_instances(self) # GUI mode if not hasattr(self, "sp"): return # annoyingly, _supports_unicode isn't good enough def fp_write(s): self.fp.write(_unicode(s)) try: fp_write("") except ValueError as e: if "closed" in str(e): return raise # pragma: no cover if pos: self.moveto(pos) if self.leave: if self.last_print_n < self.n: cur_t = self._time() # stats for overall rate (no weighted average) self.sp( self.format_meter( self.n, self.total, cur_t - self.start_t, (self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols), self.desc, self.ascii, self.unit, self.unit_scale, None, self.bar_format, self.postfix, self.unit_divisor, ) ) if pos: self.moveto(-pos) else: fp_write("\n") else: self.sp("") # clear up last bar if pos: self.moveto(-pos) else: fp_write("\r")
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def set_description(self, desc=None, refresh=True): """ Set/modify description of the progress bar. Parameters ---------- desc : str, optional refresh : bool, optional Forces refresh [default: True]. """ self.desc = desc + ": " if desc else "" if refresh: self.refresh()
def set_description(self, desc=None): """ Set/modify description of the progress bar. """ self.desc = desc + ": " if desc else ""
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def set_postfix(self, ordered_dict=None, refresh=True, **kwargs): """ Set/modify postfix (additional stats) with automatic formatting based on datatype. Parameters ---------- ordered_dict : dict or OrderedDict, optional refresh : bool, optional Forces refresh [default: True]. kwargs : dict, optional """ # Sort in alphabetical order to be more deterministic postfix = _OrderedDict([] if ordered_dict is None else ordered_dict) for key in sorted(kwargs.keys()): postfix[key] = kwargs[key] # Preprocess stats according to datatype for key in postfix.keys(): # Number: limit the length of the string if isinstance(postfix[key], Number): postfix[key] = "{0:2.3g}".format(postfix[key]) # Else for any other type, try to get the string conversion elif not isinstance(postfix[key], _basestring): postfix[key] = str(postfix[key]) # Else if it's a string, don't need to preprocess anything # Stitch together to get the final postfix self.postfix = ", ".join(key + "=" + postfix[key].strip() for key in postfix.keys()) if refresh: self.refresh()
def set_postfix(self, ordered_dict=None, **kwargs): """ Set/modify postfix (additional stats) with automatic formatting based on datatype. """ # Sort in alphabetical order to be more deterministic postfix = _OrderedDict([] if ordered_dict is None else ordered_dict) for key in sorted(kwargs.keys()): postfix[key] = kwargs[key] # Preprocess stats according to datatype for key in postfix.keys(): # Number: limit the length of the string if isinstance(postfix[key], Number): postfix[key] = "{0:2.3g}".format(postfix[key]) # Else for any other type, try to get the string conversion elif not isinstance(postfix[key], _basestring): postfix[key] = str(postfix[key]) # Else if it's a string, don't need to preprocess anything # Stitch together to get the final postfix self.postfix = ", ".join(key + "=" + postfix[key].strip() for key in postfix.keys())
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def moveto(self, n): self.fp.write(_unicode("\n" * n + _term_move_up() * -n)) self.fp.flush()
def moveto(self, n): self.fp.write(_unicode("\n" * n + _term_move_up() * -n))
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def clear(self, nolock=False): """ Clear current bar display """ if self.disable: return if not nolock: self._lock.acquire() self.moveto(abs(self.pos)) self.sp("") self.fp.write("\r") # place cursor back at the beginning of line self.moveto(-abs(self.pos)) if not nolock: self._lock.release()
def clear(self, nomove=False): """ Clear current bar display """ if self.disable: return if not nomove: self.moveto(self.pos) # clear up the bar (can't rely on sp('')) self.fp.write("\r") self.fp.write(" " * (self.ncols if self.ncols else 10)) self.fp.write("\r") # place cursor back at the beginning of line if not nomove: self.moveto(-self.pos)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def refresh(self, nolock=False): """ Force refresh the display of this bar """ if self.disable: return if not nolock: self._lock.acquire() self.moveto(abs(self.pos)) self.sp(self.__repr__()) self.moveto(-abs(self.pos)) if not nolock: self._lock.release()
def refresh(self): """ Force refresh the display of this bar """ if self.disable: return self.moveto(self.pos) # clear up this line's content (whatever there was) self.clear(nomove=True) # Print current/last bar state self.fp.write(self.__repr__()) self.moveto(-self.pos)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _is_utf(encoding): try: "\u2588\u2589".encode(encoding) except UnicodeEncodeError: # pragma: no cover return False except Exception: # pragma: no cover try: return encoding.lower().startswith("utf-") or ("U8" == encoding) except: return False else: return True
def _is_utf(encoding): return encoding.lower().startswith("utf-") or ("U8" == encoding)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _supports_unicode(fp): try: return _is_utf(fp.encoding) except AttributeError: return False
def _supports_unicode(file): return ( _is_utf(file.encoding) if ( getattr(file, "encoding", None) or # FakeStreams from things like bpython-curses can lie getattr(file, "interface", None) ) else False ) # pragma: no cover
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _environ_cols_windows(fp): # pragma: no cover try: from ctypes import windll, create_string_buffer import struct from sys import stdin, stdout io_handle = -12 # assume stderr if fp == stdin: io_handle = -10 elif fp == stdout: io_handle = -11 h = windll.kernel32.GetStdHandle(io_handle) csbi = create_string_buffer(22) res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) if res: ( _bufx, _bufy, _curx, _cury, _wattr, left, _top, right, _bottom, _maxx, _maxy, ) = struct.unpack("hhhhHhhhhhh", csbi.raw) # nlines = bottom - top + 1 return right - left # +1 except: pass return None
def _environ_cols_windows(fp): # pragma: no cover try: from ctypes import windll, create_string_buffer import struct from sys import stdin, stdout io_handle = None if fp == stdin: io_handle = -10 elif fp == stdout: io_handle = -11 else: # assume stderr io_handle = -12 h = windll.kernel32.GetStdHandle(io_handle) csbi = create_string_buffer(22) res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) if res: ( _bufx, _bufy, _curx, _cury, _wattr, left, _top, right, _bottom, _maxx, _maxy, ) = struct.unpack("hhhhHhhhhhh", csbi.raw) # nlines = bottom - top + 1 return right - left # +1 except: pass return None
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _environ_cols_tput(*_): # pragma: no cover """cygwin xterm (windows)""" try: import shlex cols = int(subprocess.check_call(shlex.split("tput cols"))) # rows = int(subprocess.check_call(shlex.split('tput lines'))) return cols except: pass return None
def _environ_cols_tput(*args): # pragma: no cover """cygwin xterm (windows)""" try: import shlex cols = int(subprocess.check_call(shlex.split("tput cols"))) # rows = int(subprocess.check_call(shlex.split('tput lines'))) return cols except: pass return None
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __reduce__(self): items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() inst_dict.pop("_keys", None) return self.__class__, (items,), inst_dict
def __reduce__(self): items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() inst_dict.pop("_keys", None) return (self.__class__, (items,), inst_dict)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def status_printer(_, total=None, desc=None): """ Manage the printing of an IPython/Jupyter Notebook progress bar widget. """ # Fallback to text bar if there's no total # DEPRECATED: replaced with an 'info' style bar # if not total: # return super(tqdm_notebook, tqdm_notebook).status_printer(file) # fp = file # Prepare IPython progress bar if total: pbar = IntProgress(min=0, max=total) else: # No total? Show info style bar with no progress tqdm status pbar = IntProgress(min=0, max=1) pbar.value = 1 pbar.bar_style = "info" if desc: pbar.description = desc # Prepare status text ptext = HTML() # Only way to place text to the right of the bar is to use a container container = HBox(children=[pbar, ptext]) display(container) def print_status(s="", close=False, bar_style=None, desc=None): # Note: contrary to native tqdm, s='' does NOT clear bar # goal is to keep all infos if error happens so user knows # at which iteration the loop failed. # Clear previous output (really necessary?) # clear_output(wait=1) # Get current iteration value from format_meter string if total: # n = None if s: npos = s.find(r"/|/") # cause we use bar_format=r'{n}|...' # Check that n can be found in s (else n > total) if npos >= 0: n = int(s[:npos]) # get n from string s = s[npos + 3 :] # remove from string # Update bar with current n value if n is not None: pbar.value = n # Print stats if s: # never clear the bar (signal: s='') s = s.replace("||", "") # remove inesthetical pipes s = escape(s) # html escape special characters (like '?') ptext.value = s # Change bar style if bar_style: # Hack-ish way to avoid the danger bar_style being overriden by # success because the bar gets closed after the error... if not (pbar.bar_style == "danger" and bar_style == "success"): pbar.bar_style = bar_style # Special signal to close the bar if close and pbar.bar_style != "danger": # hide only if no error try: container.close() except AttributeError: container.visible = False # Update description if desc: pbar.description = desc return print_status
def status_printer(_, total=None, desc=None): """ Manage the printing of an IPython/Jupyter Notebook progress bar widget. """ # Fallback to text bar if there's no total # DEPRECATED: replaced with an 'info' style bar # if not total: # return super(tqdm_notebook, tqdm_notebook).status_printer(file) # fp = file # Prepare IPython progress bar if total: pbar = IntProgress(min=0, max=total) else: # No total? Show info style bar with no progress tqdm status pbar = IntProgress(min=0, max=1) pbar.value = 1 pbar.bar_style = "info" if desc: pbar.description = desc # Prepare status text ptext = HTML() # Only way to place text to the right of the bar is to use a container container = HBox(children=[pbar, ptext]) display(container) def print_status(s="", close=False, bar_style=None): # Note: contrary to native tqdm, s='' does NOT clear bar # goal is to keep all infos if error happens so user knows # at which iteration the loop failed. # Clear previous output (really necessary?) # clear_output(wait=1) # Get current iteration value from format_meter string if total: n = None if s: npos = s.find(r"/|/") # cause we use bar_format=r'{n}|...' # Check that n can be found in s (else n > total) if npos >= 0: n = int(s[:npos]) # get n from string s = s[npos + 3 :] # remove from string # Update bar with current n value if n is not None: pbar.value = n # Print stats if s: # never clear the bar (signal: s='') s = s.replace("||", "") # remove inesthetical pipes s = escape(s) # html escape special characters (like '?') ptext.value = s # Change bar style if bar_style: # Hack-ish way to avoid the danger bar_style being overriden by # success because the bar gets closed after the error... if not (pbar.bar_style == "danger" and bar_style == "success"): pbar.bar_style = bar_style # Special signal to close the bar if close and pbar.bar_style != "danger": # hide only if no error container.visible = False return print_status
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def print_status(s="", close=False, bar_style=None, desc=None): # Note: contrary to native tqdm, s='' does NOT clear bar # goal is to keep all infos if error happens so user knows # at which iteration the loop failed. # Clear previous output (really necessary?) # clear_output(wait=1) # Get current iteration value from format_meter string if total: # n = None if s: npos = s.find(r"/|/") # cause we use bar_format=r'{n}|...' # Check that n can be found in s (else n > total) if npos >= 0: n = int(s[:npos]) # get n from string s = s[npos + 3 :] # remove from string # Update bar with current n value if n is not None: pbar.value = n # Print stats if s: # never clear the bar (signal: s='') s = s.replace("||", "") # remove inesthetical pipes s = escape(s) # html escape special characters (like '?') ptext.value = s # Change bar style if bar_style: # Hack-ish way to avoid the danger bar_style being overriden by # success because the bar gets closed after the error... if not (pbar.bar_style == "danger" and bar_style == "success"): pbar.bar_style = bar_style # Special signal to close the bar if close and pbar.bar_style != "danger": # hide only if no error try: container.close() except AttributeError: container.visible = False # Update description if desc: pbar.description = desc
def print_status(s="", close=False, bar_style=None): # Note: contrary to native tqdm, s='' does NOT clear bar # goal is to keep all infos if error happens so user knows # at which iteration the loop failed. # Clear previous output (really necessary?) # clear_output(wait=1) # Get current iteration value from format_meter string if total: n = None if s: npos = s.find(r"/|/") # cause we use bar_format=r'{n}|...' # Check that n can be found in s (else n > total) if npos >= 0: n = int(s[:npos]) # get n from string s = s[npos + 3 :] # remove from string # Update bar with current n value if n is not None: pbar.value = n # Print stats if s: # never clear the bar (signal: s='') s = s.replace("||", "") # remove inesthetical pipes s = escape(s) # html escape special characters (like '?') ptext.value = s # Change bar style if bar_style: # Hack-ish way to avoid the danger bar_style being overriden by # success because the bar gets closed after the error... if not (pbar.bar_style == "danger" and bar_style == "success"): pbar.bar_style = bar_style # Special signal to close the bar if close and pbar.bar_style != "danger": # hide only if no error container.visible = False
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def cast(val, typ): # sys.stderr.write('\ndebug | `val:type`: `' + val + ':' + typ + '`.\n') if typ == "bool": if (val == "True") or (val == ""): return True elif val == "False": return False else: raise TqdmTypeError(val + " : " + typ) try: return eval(typ + '("' + val + '")') except: if typ == "chr": return chr(ord(eval('"' + val + '"'))) else: raise TqdmTypeError(val + " : " + typ)
def cast(val, typ): log = logging.getLogger(__name__) log.debug((val, typ)) if " or " in typ: for t in typ.split(" or "): try: return cast(val, t) except TqdmTypeError: pass raise TqdmTypeError(val + " : " + typ) # sys.stderr.write('\ndebug | `val:type`: `' + val + ':' + typ + '`.\n') if typ == "bool": if (val == "True") or (val == ""): return True elif val == "False": return False else: raise TqdmTypeError(val + " : " + typ) try: return eval(typ + '("' + val + '")') except: if typ == "chr": return chr(ord(eval('"' + val + '"'))) else: raise TqdmTypeError(val + " : " + typ)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def posix_pipe( fin, fout, delim="\n", buf_size=256, callback=lambda int: None, # pragma: no cover ): """ Params ------ fin : file with `read(buf_size : int)` method fout : file with `write` (and optionally `flush`) methods. callback : function(int), e.g.: `tqdm.update` """ fp_write = fout.write tmp = "" if not delim: while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: getattr(fout, "flush", lambda: None)() # pragma: no cover return fp_write(tmp) callback(len(tmp)) return buf = "" # n = 0 while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: if buf: fp_write(buf) callback(1 + buf.count(delim)) # n += 1 + buf.count(delim) getattr(fout, "flush", lambda: None)() # pragma: no cover return # n while True: try: i = tmp.index(delim) except ValueError: buf += tmp break else: fp_write(buf + tmp[: i + len(delim)]) callback(1) # n += 1 buf = "" tmp = tmp[i + len(delim) :]
def posix_pipe( fin, fout, delim="\n", buf_size=256, callback=lambda int: None, # pragma: no cover ): """ Params ------ fin : file with `read(buf_size : int)` method fout : file with `write` (and optionally `flush`) methods. callback : function(int), e.g.: `tqdm.update` """ fp_write = fout.write # tmp = '' if not delim: while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: getattr(fout, "flush", lambda: None)() # pragma: no cover return fp_write(tmp) callback(len(tmp)) # return buf = "" # n = 0 while True: tmp = fin.read(buf_size) # flush at EOF if not tmp: if buf: fp_write(buf) callback(1 + buf.count(delim)) # n += 1 + buf.count(delim) getattr(fout, "flush", lambda: None)() # pragma: no cover return # n while True: try: i = tmp.index(delim) except ValueError: buf += tmp break else: fp_write(buf + tmp[: i + len(delim)]) callback(1) # n += 1 buf = "" tmp = tmp[i + len(delim) :]
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def main(fp=sys.stderr): """ Paramters (internal use only) --------- fp : file-like object for tqdm """ d = tqdm.__init__.__doc__ + CLI_EXTRA_DOC opt_types = dict(RE_OPTS.findall(d)) for o in UNSUPPORTED_OPTS: opt_types.pop(o) # d = RE_OPTS.sub(r' --\1=<\1> : \2', d) split = RE_OPTS.split(d) opt_types_desc = zip(split[1::3], split[2::3], split[3::3]) d = "".join( "\n --{0}=<{0}> : {1}{2}".format(*otd) for otd in opt_types_desc if otd[0] not in UNSUPPORTED_OPTS ) d = ( """Usage: tqdm [--help | options] Options: -h, --help Print this help and exit -v, --version Print version and exit """ + d.strip("\n") + "\n" ) # opts = docopt(d, version=__version__) if any(v in sys.argv for v in ("-v", "--version")): sys.stdout.write(__version__ + "\n") sys.exit(0) elif any(v in sys.argv for v in ("-h", "--help")): sys.stdout.write(d + "\n") sys.exit(0) argv = RE_SHLEX.split(" ".join(sys.argv)) opts = dict(zip(argv[1::2], argv[2::2])) tqdm_args = {"file": fp} try: for o, v in opts.items(): try: tqdm_args[o] = cast(v, opt_types[o]) except KeyError as e: raise TqdmKeyError(str(e)) # fp.write('\ndebug | args: ' + str(tqdm_args) + '\n') except: fp.write("\nError:\nUsage:\n tqdm [--help | options]\n") for i in sys.stdin: sys.stdout.write(i) raise else: buf_size = tqdm_args.pop("buf_size", 256) delim = tqdm_args.pop("delim", "\n") delim_per_char = tqdm_args.pop("bytes", False) if delim_per_char: with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, "", buf_size, t.update) elif delim == "\n": for i in tqdm(sys.stdin, **tqdm_args): sys.stdout.write(i) else: with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, delim, buf_size, t.update)
def main(fp=sys.stderr): """ Paramters (internal use only) --------- fp : file-like object for tqdm """ try: log = sys.argv.index("--log") except ValueError: logLevel = "INFO" else: # sys.argv.pop(log) # logLevel = sys.argv.pop(log) logLevel = sys.argv[log + 1] logging.basicConfig( level=getattr(logging, logLevel), format="%(levelname)s:%(module)s:%(lineno)d:%(message)s", ) log = logging.getLogger(__name__) d = tqdm.__init__.__doc__ + CLI_EXTRA_DOC opt_types = dict(RE_OPTS.findall(d)) # opt_types['delim'] = 'chr' for o in UNSUPPORTED_OPTS: opt_types.pop(o) log.debug(sorted(opt_types.items())) # d = RE_OPTS.sub(r' --\1=<\1> : \2', d) split = RE_OPTS.split(d) opt_types_desc = zip(split[1::3], split[2::3], split[3::3]) d = "".join( "\n --{0}=<{0}> : {1}{2}".format(*otd) for otd in opt_types_desc if otd[0] not in UNSUPPORTED_OPTS ) d = ( """Usage: tqdm [--help | options] Options: -h, --help Print this help and exit -v, --version Print version and exit """ + d.strip("\n") + "\n" ) # opts = docopt(d, version=__version__) if any(v in sys.argv for v in ("-v", "--version")): sys.stdout.write(__version__ + "\n") sys.exit(0) elif any(v in sys.argv for v in ("-h", "--help")): sys.stdout.write(d + "\n") sys.exit(0) argv = RE_SHLEX.split(" ".join(["tqdm"] + sys.argv[1:])) opts = dict(zip(argv[1::2], argv[2::2])) log.debug(opts) opts.pop("log", True) tqdm_args = {"file": fp} try: for o, v in opts.items(): try: tqdm_args[o] = cast(v, opt_types[o]) except KeyError as e: raise TqdmKeyError(str(e)) log.debug("args:" + str(tqdm_args)) except: fp.write("\nError:\nUsage:\n tqdm [--help | options]\n") for i in sys.stdin: sys.stdout.write(i) raise else: buf_size = tqdm_args.pop("buf_size", 256) delim = tqdm_args.pop("delim", "\n") delim_per_char = tqdm_args.pop("bytes", False) if delim_per_char: tqdm_args.setdefault("unit", "B") tqdm_args.setdefault("unit_scale", True) tqdm_args.setdefault("unit_divisor", 1024) log.debug(tqdm_args) with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, "", buf_size, t.update) elif delim == "\n": log.debug(tqdm_args) for i in tqdm(sys.stdin, **tqdm_args): sys.stdout.write(i) else: log.debug(tqdm_args) with tqdm(**tqdm_args) as t: posix_pipe(sys.stdin, sys.stdout, delim, buf_size, t.update)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def format_sizeof(num, suffix="", divisor=1000): """ Formats a number (greater than unity) with SI Order of Magnitude prefixes. Parameters ---------- num : float Number ( >= 1) to format. suffix : str, optional Post-postfix [default: '']. divisor : float, optionl Divisor between prefixes [default: 1000]. Returns ------- out : str Number with Order of Magnitude SI unit postfix. """ for unit in ["", "K", "M", "G", "T", "P", "E", "Z"]: if abs(num) < 999.95: if abs(num) < 99.95: if abs(num) < 9.995: return "{0:1.2f}".format(num) + unit + suffix return "{0:2.1f}".format(num) + unit + suffix return "{0:3.0f}".format(num) + unit + suffix num /= divisor return "{0:3.1f}Y".format(num) + suffix
def format_sizeof(num, suffix="", divisor=1000): """ Formats a number (greater than unity) with SI Order of Magnitude prefixes. Parameters ---------- num : float Number ( >= 1) to format. suffix : str, optional Post-postfix [default: '']. divisor : float, optionl Divisor between prefixes [default: 1000]. Returns ------- out : str Number with Order of Magnitude SI unit postfix. """ for unit in ["", "k", "M", "G", "T", "P", "E", "Z"]: if abs(num) < 999.95: if abs(num) < 99.95: if abs(num) < 9.995: return "{0:1.2f}".format(num) + unit + suffix return "{0:2.1f}".format(num) + unit + suffix return "{0:3.0f}".format(num) + unit + suffix num /= divisor return "{0:3.1f}Y".format(num) + suffix
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def format_meter( n, total, elapsed, ncols=None, prefix="", ascii=False, unit="it", unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, ): """ Return a string-based progress bar given some parameters Parameters ---------- n : int Number of finished iterations. total : int The expected total number of iterations. If meaningless (), only basic progress statistics are displayed (no ETA). elapsed : float Number of seconds passed since start. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progress meter to stay within this bound [default: None]. The fallback meter width is 10 for the progress bar + no limit for the iterations counter and statistics. If 0, will not print any meter (only stats). prefix : str, optional Prefix message (included in total width) [default: '']. ascii : bool, optional If not set, use unicode (smooth blocks) to fill the meter [default: False]. The fallback is to use ASCII characters (1-9 #). unit : str, optional The iteration unit [default: 'it']. unit_scale : bool, optional If set, the number of iterations will printed with an appropriate SI metric prefix (K = 10^3, M = 10^6, etc.) [default: False]. rate : float, optional Manual override for iteration rate. If [default: None], uses n/elapsed. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar is '{desc}{percentage:3.0f}%|' and r_bar is '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' Possible vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. postfix : str, optional Same as prefix but will be placed at the end as additional stats. unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. Returns ------- out : Formatted meter and stats, ready to display. """ # sanity check: total if total and n > total: total = None format_interval = tqdm.format_interval elapsed_str = format_interval(elapsed) # if unspecified, attempt to use rate = average speed # (we allow manual override since predicting time is an arcane art) if rate is None and elapsed: rate = n / elapsed inv_rate = 1 / rate if (rate and (rate < 1)) else None format_sizeof = tqdm.format_sizeof rate_fmt = ( ( ( format_sizeof(inv_rate if inv_rate else rate) if unit_scale else "{0:5.2f}".format(inv_rate if inv_rate else rate) ) if rate else "?" ) + ("s" if inv_rate else unit) + "/" + (unit if inv_rate else "s") ) if unit_scale: n_fmt = format_sizeof(n, divisor=unit_divisor) total_fmt = format_sizeof(total, divisor=unit_divisor) if total else None else: n_fmt = str(n) total_fmt = str(total) # total is known: we can predict some stats if total: # fractional and percentage progress frac = n / total percentage = frac * 100 remaining_str = format_interval((total - n) / rate) if rate else "?" # format the stats displayed to the left and right sides of the bar l_bar = (prefix if prefix else "") + "{0:3.0f}%|".format(percentage) r_bar = "| {0}/{1} [{2}<{3}, {4}{5}]".format( n_fmt, total_fmt, elapsed_str, remaining_str, rate_fmt, ", " + postfix if postfix else "", ) if ncols == 0: return l_bar[:-1] + r_bar[1:] if bar_format: # Custom bar formatting # Populate a dict with all available progress indicators bar_args = { "n": n, "n_fmt": n_fmt, "total": total, "total_fmt": total_fmt, "percentage": percentage, "rate": rate if inv_rate is None else inv_rate, "rate_noinv": rate, "rate_noinv_fmt": ( (format_sizeof(rate) if unit_scale else "{0:5.2f}".format(rate)) if rate else "?" ) + unit + "/s", "rate_fmt": rate_fmt, "elapsed": elapsed_str, "remaining": remaining_str, "l_bar": l_bar, "r_bar": r_bar, "desc": prefix if prefix else "", "postfix": ", " + postfix if postfix else "", # 'bar': full_bar # replaced by procedure below } # Interpolate supplied bar format with the dict if "{bar}" in bar_format: # Format left/right sides of the bar, and format the bar # later in the remaining space (avoid breaking display) l_bar_user, r_bar_user = bar_format.split("{bar}") l_bar = l_bar_user.format(**bar_args) r_bar = r_bar_user.format(**bar_args) else: # Else no progress bar, we can just format and return return bar_format.format(**bar_args) # Formatting progress bar # space available for bar's display N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols else 10 # format bar depending on availability of unicode/ascii chars if ascii: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 10), 10) bar = "#" * bar_length frac_bar = chr(48 + frac_bar_length) if frac_bar_length else " " else: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8) bar = _unich(0x2588) * bar_length frac_bar = _unich(0x2590 - frac_bar_length) if frac_bar_length else " " # whitespace padding if bar_length < N_BARS: full_bar = bar + frac_bar + " " * max(N_BARS - bar_length - 1, 0) else: full_bar = bar + " " * max(N_BARS - bar_length, 0) # Piece together the bar parts return l_bar + full_bar + r_bar # no total: no progressbar, ETA, just progress stats else: return (prefix if prefix else "") + "{0}{1} [{2}, {3}{4}]".format( n_fmt, unit, elapsed_str, rate_fmt, ", " + postfix if postfix else "" )
def format_meter( n, total, elapsed, ncols=None, prefix="", ascii=False, unit="it", unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, ): """ Return a string-based progress bar given some parameters Parameters ---------- n : int Number of finished iterations. total : int The expected total number of iterations. If meaningless (), only basic progress statistics are displayed (no ETA). elapsed : float Number of seconds passed since start. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progress meter to stay within this bound [default: None]. The fallback meter width is 10 for the progress bar + no limit for the iterations counter and statistics. If 0, will not print any meter (only stats). prefix : str, optional Prefix message (included in total width) [default: '']. Use as {desc} in bar_format string. ascii : bool, optional If not set, use unicode (smooth blocks) to fill the meter [default: False]. The fallback is to use ASCII characters (1-9 #). unit : str, optional The iteration unit [default: 'it']. unit_scale : bool or int or float, optional If 1 or True, the number of iterations will be printed with an appropriate SI metric prefix (k = 10^3, M = 10^6, etc.) [default: False]. If any other non-zero number, will scale `total` and `n`. rate : float, optional Manual override for iteration rate. If [default: None], uses n/elapsed. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar='{desc}: {percentage:3.0f}%|' and r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. Note that a trailing ": " is automatically removed after {desc} if the latter is empty. postfix : *, optional Similar to `prefix`, but placed at the end (e.g. for additional stats). Note: postfix is usually a string (not a dict) for this method, and will if possible be set to postfix = ', ' + postfix. However other types are supported (#382). unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. Returns ------- out : Formatted meter and stats, ready to display. """ # sanity check: total if total and n > total: total = None # apply custom scale if necessary if unit_scale and unit_scale not in (True, 1): total *= unit_scale n *= unit_scale unit_scale = False format_interval = tqdm.format_interval elapsed_str = format_interval(elapsed) # if unspecified, attempt to use rate = average speed # (we allow manual override since predicting time is an arcane art) if rate is None and elapsed: rate = n / elapsed inv_rate = 1 / rate if rate else None format_sizeof = tqdm.format_sizeof rate_noinv_fmt = ( ( (format_sizeof(rate) if unit_scale else "{0:5.2f}".format(rate)) if rate else "?" ) + unit + "/s" ) rate_inv_fmt = ( ( (format_sizeof(inv_rate) if unit_scale else "{0:5.2f}".format(inv_rate)) if inv_rate else "?" ) + "s/" + unit ) rate_fmt = rate_inv_fmt if inv_rate and inv_rate > 1 else rate_noinv_fmt if unit_scale: n_fmt = format_sizeof(n, divisor=unit_divisor) total_fmt = format_sizeof(total, divisor=unit_divisor) if total else None else: n_fmt = str(n) total_fmt = str(total) try: postfix = ", " + postfix if postfix else "" except TypeError: pass # total is known: we can predict some stats if total: # fractional and percentage progress frac = n / total percentage = frac * 100 remaining_str = format_interval((total - n) / rate) if rate else "?" # format the stats displayed to the left and right sides of the bar if prefix: # old prefix setup work around bool_prefix_colon_already = prefix[-2:] == ": " l_bar = prefix if bool_prefix_colon_already else prefix + ": " else: l_bar = "" l_bar += "{0:3.0f}%|".format(percentage) r_bar = "| {0}/{1} [{2}<{3}, {4}{5}]".format( n_fmt, total_fmt, elapsed_str, remaining_str, rate_fmt, postfix ) if ncols == 0: return l_bar[:-1] + r_bar[1:] if bar_format: # Custom bar formatting # Populate a dict with all available progress indicators bar_args = { "n": n, "n_fmt": n_fmt, "total": total, "total_fmt": total_fmt, "percentage": percentage, "rate": inv_rate if inv_rate and inv_rate > 1 else rate, "rate_fmt": rate_fmt, "rate_noinv": rate, "rate_noinv_fmt": rate_noinv_fmt, "rate_inv": inv_rate, "rate_inv_fmt": rate_inv_fmt, "elapsed": elapsed_str, "remaining": remaining_str, "l_bar": l_bar, "r_bar": r_bar, "desc": prefix or "", "postfix": postfix, # 'bar': full_bar # replaced by procedure below } # auto-remove colon for empty `desc` if not prefix: bar_format = bar_format.replace("{desc}: ", "") # Interpolate supplied bar format with the dict if "{bar}" in bar_format: # Format left/right sides of the bar, and format the bar # later in the remaining space (avoid breaking display) l_bar_user, r_bar_user = bar_format.split("{bar}") l_bar = l_bar_user.format(**bar_args) r_bar = r_bar_user.format(**bar_args) else: # Else no progress bar, we can just format and return return bar_format.format(**bar_args) # Formatting progress bar # space available for bar's display N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols else 10 # format bar depending on availability of unicode/ascii chars if ascii: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 10), 10) bar = "#" * bar_length frac_bar = chr(48 + frac_bar_length) if frac_bar_length else " " else: bar_length, frac_bar_length = divmod(int(frac * N_BARS * 8), 8) bar = _unich(0x2588) * bar_length frac_bar = _unich(0x2590 - frac_bar_length) if frac_bar_length else " " # whitespace padding if bar_length < N_BARS: full_bar = bar + frac_bar + " " * max(N_BARS - bar_length - 1, 0) else: full_bar = bar + " " * max(N_BARS - bar_length, 0) # Piece together the bar parts return l_bar + full_bar + r_bar # no total: no progressbar, ETA, just progress stats else: return ((prefix + ": ") if prefix else "") + "{0}{1} [{2}, {3}{4}]".format( n_fmt, unit, elapsed_str, rate_fmt, postfix )
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __new__(cls, *args, **kwargs): # Create a new instance instance = object.__new__(cls) # Add to the list of instances if "_instances" not in cls.__dict__: cls._instances = WeakSet() cls._instances.add(instance) # Create the monitoring thread if cls.monitor_interval and (cls.monitor is None or not cls.monitor.report()): cls.monitor = TMonitor(cls, cls.monitor_interval) # Return the instance return instance
def __new__(cls, *args, **kwargs): # Create a new instance instance = object.__new__(cls) # Add to the list of instances if "_instances" not in cls.__dict__: cls._instances = WeakSet() if "_lock" not in cls.__dict__: cls._lock = TqdmDefaultWriteLock() with cls._lock: cls._instances.add(instance) # Create the monitoring thread if cls.monitor_interval and (cls.monitor is None or not cls.monitor.report()): try: cls.monitor = TMonitor(cls, cls.monitor_interval) except Exception as e: # pragma: nocover warn( "tqdm:disabling monitor support" " (monitor_interval = 0) due to:\n" + str(e), TqdmMonitorWarning, ) cls.monitor_interval = 0 # Return the instance return instance
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _get_free_pos(cls, instance=None): """Skips specified instance""" try: return max(inst.pos for inst in cls._instances if inst is not instance) + 1 except ValueError as e: if "arg is an empty sequence" in str(e): return 0 raise # pragma: no cover
def _get_free_pos(cls, instance=None): """Skips specified instance""" positions = set(abs(inst.pos) for inst in cls._instances if inst is not instance) return min(set(range(len(positions) + 1)).difference(positions))
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _decr_instances(cls, instance): """ Remove from list and reposition other bars so that newer bars won't overlap previous bars """ try: # in case instance was explicitly positioned, it won't be in set cls._instances.remove(instance) for inst in cls._instances: if inst.pos > instance.pos: inst.pos -= 1 # Kill monitor if no instances are left if not cls._instances and cls.monitor: cls.monitor.exit() try: del cls.monitor except AttributeError: pass cls.monitor = None except KeyError: pass
def _decr_instances(cls, instance): """ Remove from list and reposition other bars so that newer bars won't overlap previous bars """ with cls._lock: try: cls._instances.remove(instance) except KeyError: if not instance.gui: # pragma: no cover raise else: for inst in cls._instances: # negative `pos` means fixed if inst.pos > abs(instance.pos): inst.pos -= 1 # TODO: check this doesn't overwrite another fixed bar # Kill monitor if no instances are left if not cls._instances and cls.monitor: try: cls.monitor.exit() del cls.monitor except AttributeError: # pragma: nocover pass else: cls.monitor = None
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def write(cls, s, file=None, end="\n"): """ Print a message via tqdm (without overlap with bars) """ fp = file if file is not None else sys.stdout # Clear all bars inst_cleared = [] for inst in getattr(cls, "_instances", []): # Clear instance if in the target output file # or if write output + tqdm output are both either # sys.stdout or sys.stderr (because both are mixed in terminal) if inst.fp == fp or all(f in (sys.stdout, sys.stderr) for f in (fp, inst.fp)): inst.clear() inst_cleared.append(inst) # Write the message fp.write(s) fp.write(end) # Force refresh display of bars we cleared for inst in inst_cleared: # Avoid race conditions by checking that the instance started if hasattr(inst, "start_t"): # pragma: nocover inst.refresh()
def write(cls, s, file=None, end="\n", nolock=False): """ Print a message via tqdm (without overlap with bars) """ fp = file if file is not None else sys.stdout with cls.external_write_mode(file=file, nolock=nolock): # Write the message fp.write(s) fp.write(end)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def pandas(tclass, *targs, **tkwargs): """ Registers the given `tqdm` class with pandas.core. ( frame.DataFrame | series.Series | groupby.DataFrameGroupBy | groupby.SeriesGroupBy ).progress_apply A new instance will be create every time `progress_apply` is called, and each instance will automatically close() upon completion. Parameters ---------- targs, tkwargs : arguments for the tqdm instance Examples -------- >>> import pandas as pd >>> import numpy as np >>> from tqdm import tqdm, tqdm_gui >>> >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc >>> # Now you can use `progress_apply` instead of `apply` >>> df.groupby(0).progress_apply(lambda x: x**2) References ---------- https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python """ from pandas.core.frame import DataFrame from pandas.core.series import Series from pandas.core.groupby import DataFrameGroupBy from pandas.core.groupby import SeriesGroupBy from pandas.core.groupby import GroupBy from pandas.core.groupby import PanelGroupBy from pandas import Panel deprecated_t = [tkwargs.pop("deprecated_t", None)] def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner # Monkeypatch pandas to provide easy methods # Enable custom tqdm progress in pandas! Series.progress_apply = inner_generator() SeriesGroupBy.progress_apply = inner_generator() Series.progress_map = inner_generator("map") SeriesGroupBy.progress_map = inner_generator("map") DataFrame.progress_apply = inner_generator() DataFrameGroupBy.progress_apply = inner_generator() DataFrame.progress_applymap = inner_generator("applymap") Panel.progress_apply = inner_generator() PanelGroupBy.progress_apply = inner_generator() GroupBy.progress_apply = inner_generator() GroupBy.progress_aggregate = inner_generator("aggregate") GroupBy.progress_transform = inner_generator("transform")
def pandas(tclass, *targs, **tkwargs): """ Registers the given `tqdm` class with pandas.core. ( frame.DataFrame | series.Series | groupby.DataFrameGroupBy | groupby.SeriesGroupBy ).progress_apply A new instance will be create every time `progress_apply` is called, and each instance will automatically close() upon completion. Parameters ---------- targs, tkwargs : arguments for the tqdm instance Examples -------- >>> import pandas as pd >>> import numpy as np >>> from tqdm import tqdm, tqdm_gui >>> >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc >>> # Now you can use `progress_apply` instead of `apply` >>> df.groupby(0).progress_apply(lambda x: x**2) References ---------- https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python """ from pandas.core.frame import DataFrame from pandas.core.series import Series from pandas.core.groupby import DataFrameGroupBy from pandas.core.groupby import SeriesGroupBy from pandas.core.groupby import GroupBy from pandas.core.groupby import PanelGroupBy from pandas import Panel deprecated_t = [tkwargs.pop("deprecated_t", None)] def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner # Monkeypatch pandas to provide easy methods # Enable custom tqdm progress in pandas! Series.progress_apply = inner_generator() SeriesGroupBy.progress_apply = inner_generator() Series.progress_map = inner_generator("map") SeriesGroupBy.progress_map = inner_generator("map") DataFrame.progress_apply = inner_generator() DataFrameGroupBy.progress_apply = inner_generator() DataFrame.progress_applymap = inner_generator("applymap") Panel.progress_apply = inner_generator() PanelGroupBy.progress_apply = inner_generator() GroupBy.progress_apply = inner_generator() GroupBy.progress_aggregate = inner_generator("aggregate") GroupBy.progress_transform = inner_generator("transform")
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner
def inner_generator(df_function="apply"): def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result return inner
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. *args, *kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped total = len(df) if isinstance(df, Series) else df.size // len(df) else: total += 1 # pandas calls update once too many # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) # Define bar updating wrapper def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs) # Apply the provided function (in *args and **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, *args, **kwargs) # Close bar and return pandas calculation result t.close() return result
def inner(df, func, *args, **kwargs): """ Parameters ---------- df : (DataFrame|Series)[GroupBy] Data (may be grouped). func : function To be applied on the (grouped) data. **kwargs : optional Transmitted to `df.apply()`. """ # Precompute total iterations total = getattr(df, "ngroups", None) if total is None: # not grouped if df_function == "applymap": total = df.size elif isinstance(df, Series): total = len(df) else: # DataFrame or Panel axis = kwargs.get("axis", 0) # when axis=0, total is shape[axis1] total = df.size // df.shape[axis] # Init bar if deprecated_t[0] is not None: t = deprecated_t[0] deprecated_t[0] = None else: t = tclass(*targs, total=total, **tkwargs) if len(args) > 0: # *args intentionally not supported (see #244, #299) TqdmDeprecationWarning( "Except func, normal arguments are intentionally" + " not supported by" + " `(DataFrame|Series|GroupBy).progress_apply`." + " Use keyword arguments instead.", fp_write=getattr(t.fp, "write", sys.stderr.write), ) # Define bar updating wrapper def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs) # Apply the provided function (in **kwargs) # on the df using our wrapper (which provides bar updating) result = getattr(df, df_function)(wrapper, **kwargs) # Close bar and return pandas calculation result t.close() return result
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def wrapper(*args, **kwargs): t.update() return func(*args, **kwargs)
def wrapper(*args, **kwargs): # update tbar correctly # it seems `pandas apply` calls `func` twice # on the first column/row to decide whether it can # take a fast or slow code path; so stop when t.total==t.n t.update(n=1 if t.total and t.n < t.total else 0) return func(*args, **kwargs)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __init__( self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit="it", unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, gui=False, **kwargs, ): """ Parameters ---------- iterable : iterable, optional Iterable to decorate with a progressbar. Leave blank to manually manage the updates. desc : str, optional Prefix for the progressbar. total : int, optional The number of expected iterations. If unspecified, len(iterable) is used if possible. As a last resort, only basic progress statistics are displayed (no ETA, no progressbar). If `gui` is True and this parameter needs subsequent updating, specify an initial arbitrary large positive integer, e.g. int(9e9). leave : bool, optional If [default: True], keeps all traces of the progressbar upon termination of iteration. file : `io.TextIOWrapper` or `io.StringIO`, optional Specifies where to output the progress messages (default: sys.stderr). Uses `file.write(str)` and `file.flush()` methods. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progressbar to stay within this bound. If unspecified, attempts to use environment width. The fallback is a meter width of 10 and no limit for the counter and statistics. If 0, will not print any meter (only stats). mininterval : float, optional Minimum progress display update interval, in seconds [default: 0.1]. maxinterval : float, optional Maximum progress display update interval, in seconds [default: 10]. Automatically adjusts `miniters` to correspond to `mininterval` after long display update lag. Only works if `dynamic_miniters` or monitor thread is enabled. miniters : int, optional Minimum progress display update interval, in iterations. If 0 and `dynamic_miniters`, will automatically adjust to equal `mininterval` (more CPU efficient, good for tight loops). If > 0, will skip display of specified number of iterations. Tweak this and `mininterval` to get very efficient loops. If your progress is erratic with both fast and slow iterations (network, skipping items, etc) you should set miniters=1. ascii : bool, optional If unspecified or False, use unicode (smooth blocks) to fill the meter. The fallback is to use ASCII characters `1-9 #`. disable : bool, optional Whether to disable the entire progressbar wrapper [default: False]. If set to None, disable on non-TTY. unit : str, optional String that will be used to define the unit of each iteration [default: it]. unit_scale : bool, optional If set, the number of iterations will be reduced/scaled automatically and a metric prefix following the International System of Units standard will be added (kilo, mega, etc.) [default: False]. dynamic_ncols : bool, optional If set, constantly alters `ncols` to the environment (allowing for window resizes) [default: False]. smoothing : float, optional Exponential moving average smoothing factor for speed estimates (ignored in GUI mode). Ranges from 0 (average speed) to 1 (current/instantaneous speed) [default: 0.3]. bar_format : str, optional Specify a custom bar string formatting. May impact performance. If unspecified, will use '{l_bar}{bar}{r_bar}', where l_bar is '{desc}{percentage:3.0f}%|' and r_bar is '| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]' Possible vars: bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, elapsed, remaining, l_bar, r_bar, desc. initial : int, optional The initial counter value. Useful when restarting a progress bar [default: 0]. position : int, optional Specify the line offset to print this bar (starting from 0) Automatic if unspecified. Useful to manage multiple bars at once (eg, from threads). postfix : dict, optional Specify additional stats to display at the end of the bar. unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. gui : bool, optional WARNING: internal parameter - do not use. Use tqdm_gui(...) instead. If set, will attempt to use matplotlib animations for a graphical output [default: False]. Returns ------- out : decorated iterator. """ if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True if disable: self.iterable = iterable self.disable = disable self.pos = self._get_free_pos(self) self._instances.remove(self) return if file is None: file = sys.stderr if kwargs: self.disable = True self.pos = self._get_free_pos(self) self._instances.remove(self) raise ( TqdmDeprecationWarning( """\ `nested` is deprecated and automated. Use position instead for manual control. """, fp_write=getattr(file, "write", sys.stderr.write), ) if "nested" in kwargs else TqdmKeyError("Unknown argument(s): " + str(kwargs)) ) # Preprocess the arguments if total is None and iterable is not None: try: total = len(iterable) except (TypeError, AttributeError): total = None if ( (ncols is None) and (file in (sys.stderr, sys.stdout)) ) or dynamic_ncols: # pragma: no cover if dynamic_ncols: dynamic_ncols = _environ_cols_wrapper() if dynamic_ncols: ncols = dynamic_ncols(file) # elif ncols is not None: # ncols = 79 else: _dynamic_ncols = _environ_cols_wrapper() if _dynamic_ncols: ncols = _dynamic_ncols(file) # else: # ncols = 79 if miniters is None: miniters = 0 dynamic_miniters = True else: dynamic_miniters = False if mininterval is None: mininterval = 0 if maxinterval is None: maxinterval = 0 if ascii is None: ascii = not _supports_unicode(file) if bar_format and not ascii: # Convert bar format into unicode since terminal uses unicode bar_format = _unicode(bar_format) if smoothing is None: smoothing = 0 # Store the arguments self.iterable = iterable self.desc = desc + ": " if desc else "" self.total = total self.leave = leave self.fp = file self.ncols = ncols self.mininterval = mininterval self.maxinterval = maxinterval self.miniters = miniters self.dynamic_miniters = dynamic_miniters self.ascii = ascii self.disable = disable self.unit = unit self.unit_scale = unit_scale self.unit_divisor = unit_divisor self.gui = gui self.dynamic_ncols = dynamic_ncols self.smoothing = smoothing self.avg_time = None self._time = time self.bar_format = bar_format self.postfix = None if postfix: self.set_postfix(**postfix) # Init the iterations counters self.last_print_n = initial self.n = initial # if nested, at initial sp() call we replace '\r' by '\n' to # not overwrite the outer progress bar if position is None: self.pos = self._get_free_pos(self) else: self.pos = position self._instances.remove(self) if not gui: # Initialize the screen printer self.sp = self.status_printer(self.fp) if self.pos: self.moveto(self.pos) self.sp( self.format_meter( self.n, total, 0, (dynamic_ncols(file) if dynamic_ncols else ncols), self.desc, ascii, unit, unit_scale, None, bar_format, self.postfix, unit_divisor, ) ) if self.pos: self.moveto(-self.pos) # Init the time counter self.last_print_t = self._time() # NB: Avoid race conditions by setting start_t at the very end of init self.start_t = self.last_print_t
def __init__( self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit="it", unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, gui=False, **kwargs, ): """ Parameters ---------- iterable : iterable, optional Iterable to decorate with a progressbar. Leave blank to manually manage the updates. desc : str, optional Prefix for the progressbar. total : int, optional The number of expected iterations. If unspecified, len(iterable) is used if possible. As a last resort, only basic progress statistics are displayed (no ETA, no progressbar). If `gui` is True and this parameter needs subsequent updating, specify an initial arbitrary large positive integer, e.g. int(9e9). leave : bool, optional If [default: True], keeps all traces of the progressbar upon termination of iteration. file : `io.TextIOWrapper` or `io.StringIO`, optional Specifies where to output the progress messages (default: sys.stderr). Uses `file.write(str)` and `file.flush()` methods. ncols : int, optional The width of the entire output message. If specified, dynamically resizes the progressbar to stay within this bound. If unspecified, attempts to use environment width. The fallback is a meter width of 10 and no limit for the counter and statistics. If 0, will not print any meter (only stats). mininterval : float, optional Minimum progress display update interval, in seconds [default: 0.1]. maxinterval : float, optional Maximum progress display update interval, in seconds [default: 10]. Automatically adjusts `miniters` to correspond to `mininterval` after long display update lag. Only works if `dynamic_miniters` or monitor thread is enabled. miniters : int, optional Minimum progress display update interval, in iterations. If 0 and `dynamic_miniters`, will automatically adjust to equal `mininterval` (more CPU efficient, good for tight loops). If > 0, will skip display of specified number of iterations. Tweak this and `mininterval` to get very efficient loops. If your progress is erratic with both fast and slow iterations (network, skipping items, etc) you should set miniters=1. ascii : bool, optional If unspecified or False, use unicode (smooth blocks) to fill the meter. The fallback is to use ASCII characters `1-9 #`. disable : bool, optional Whether to disable the entire progressbar wrapper [default: False]. If set to None, disable on non-TTY. unit : str, optional String that will be used to define the unit of each iteration [default: it]. unit_scale : bool or int or float, optional If 1 or True, the number of iterations will be reduced/scaled automatically and a metric prefix following the International System of Units standard will be added (kilo, mega, etc.) [default: False]. If any other non-zero number, will scale `total` and `n`. dynamic_ncols : bool, optional If set, constantly alters `ncols` to the environment (allowing for window resizes) [default: False]. smoothing : float, optional Exponential moving average smoothing factor for speed estimates (ignored in GUI mode). Ranges from 0 (average speed) to 1 (current/instantaneous speed) [default: 0.3]. bar_format : str, optional Specify a custom bar string formatting. May impact performance. [default: '{l_bar}{bar}{r_bar}'], where l_bar='{desc}: {percentage:3.0f}%|' and r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' '{rate_fmt}{postfix}]' Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt, rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix. Note that a trailing ": " is automatically removed after {desc} if the latter is empty. initial : int, optional The initial counter value. Useful when restarting a progress bar [default: 0]. position : int, optional Specify the line offset to print this bar (starting from 0) Automatic if unspecified. Useful to manage multiple bars at once (eg, from threads). postfix : dict or *, optional Specify additional stats to display at the end of the bar. Calls `set_postfix(**postfix)` if possible (dict). unit_divisor : float, optional [default: 1000], ignored unless `unit_scale` is True. gui : bool, optional WARNING: internal parameter - do not use. Use tqdm_gui(...) instead. If set, will attempt to use matplotlib animations for a graphical output [default: False]. Returns ------- out : decorated iterator. """ if file is None: file = sys.stderr if disable is None and hasattr(file, "isatty") and not file.isatty(): disable = True if disable: self.iterable = iterable self.disable = disable self.pos = self._get_free_pos(self) self._instances.remove(self) self.n = initial return if kwargs: self.disable = True self.pos = self._get_free_pos(self) self._instances.remove(self) raise ( TqdmDeprecationWarning( """\ `nested` is deprecated and automated. Use position instead for manual control. """, fp_write=getattr(file, "write", sys.stderr.write), ) if "nested" in kwargs else TqdmKeyError("Unknown argument(s): " + str(kwargs)) ) # Preprocess the arguments if total is None and iterable is not None: try: total = len(iterable) except (TypeError, AttributeError): total = None if ( (ncols is None) and (file in (sys.stderr, sys.stdout)) ) or dynamic_ncols: # pragma: no cover if dynamic_ncols: dynamic_ncols = _environ_cols_wrapper() if dynamic_ncols: ncols = dynamic_ncols(file) # elif ncols is not None: # ncols = 79 else: _dynamic_ncols = _environ_cols_wrapper() if _dynamic_ncols: ncols = _dynamic_ncols(file) # else: # ncols = 79 if miniters is None: miniters = 0 dynamic_miniters = True else: dynamic_miniters = False if mininterval is None: mininterval = 0 if maxinterval is None: maxinterval = 0 if ascii is None: ascii = not _supports_unicode(file) if bar_format and not ascii: # Convert bar format into unicode since terminal uses unicode bar_format = _unicode(bar_format) if smoothing is None: smoothing = 0 # Store the arguments self.iterable = iterable self.desc = desc or "" self.total = total self.leave = leave self.fp = file self.ncols = ncols self.mininterval = mininterval self.maxinterval = maxinterval self.miniters = miniters self.dynamic_miniters = dynamic_miniters self.ascii = ascii self.disable = disable self.unit = unit self.unit_scale = unit_scale self.unit_divisor = unit_divisor self.gui = gui self.dynamic_ncols = dynamic_ncols self.smoothing = smoothing self.avg_time = None self._time = time self.bar_format = bar_format self.postfix = None if postfix: try: self.set_postfix(refresh=False, **postfix) except TypeError: self.postfix = postfix # Init the iterations counters self.last_print_n = initial self.n = initial # if nested, at initial sp() call we replace '\r' by '\n' to # not overwrite the outer progress bar if position is None: self.pos = self._get_free_pos(self) else: # mark fixed positions as negative self.pos = -position if not gui: # Initialize the screen printer self.sp = self.status_printer(self.fp) with self._lock: if self.pos: self.moveto(abs(self.pos)) self.sp(self.__repr__(elapsed=0)) if self.pos: self.moveto(-abs(self.pos)) # Init the time counter self.last_print_t = self._time() # NB: Avoid race conditions by setting start_t at the very end of init self.start_t = self.last_print_t
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __repr__(self): return self.format_meter( self.n, self.total, self._time() - self.start_t, self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols, self.desc, self.ascii, self.unit, self.unit_scale, 1 / self.avg_time if self.avg_time else None, self.bar_format, self.postfix, )
def __repr__(self, elapsed=None): return self.format_meter( self.n, self.total, elapsed if elapsed is not None else self._time() - self.start_t, self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols, self.desc, self.ascii, self.unit, self.unit_scale, 1 / self.avg_time if self.avg_time else None, self.bar_format, self.postfix, self.unit_divisor, )
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __lt__(self, other): return self.pos < other.pos
def __lt__(self, other): return abs(self.pos) < abs(other.pos)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __eq__(self, other): return self.pos == other.pos
def __eq__(self, other): return abs(self.pos) == abs(other.pos)
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __iter__(self): """Backward-compatibility to use: for x in tqdm(iterable)""" # Inlining instance variables as locals (speed optimisation) iterable = self.iterable # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: for obj in iterable: yield obj else: ncols = self.ncols mininterval = self.mininterval maxinterval = self.maxinterval miniters = self.miniters dynamic_miniters = self.dynamic_miniters unit = self.unit unit_scale = self.unit_scale unit_divisor = self.unit_divisor ascii = self.ascii start_t = self.start_t last_print_t = self.last_print_t last_print_n = self.last_print_n n = self.n dynamic_ncols = self.dynamic_ncols smoothing = self.smoothing avg_time = self.avg_time bar_format = self.bar_format _time = self._time format_meter = self.format_meter try: sp = self.sp except AttributeError: raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) for obj in iterable: yield obj # Update and print the progressbar. # Note: does not call self.update(1) for speed optimisation. n += 1 # check the counter first (avoid calls to time()) if n - last_print_n >= self.miniters: miniters = self.miniters # watch monitoring thread changes delta_t = _time() - last_print_t if delta_t >= mininterval: cur_t = _time() delta_it = n - last_print_n elapsed = cur_t - start_t # optimised if in inner loop # EMA (not just overall average) if smoothing and delta_t and delta_it: avg_time = ( delta_t / delta_it if avg_time is None else smoothing * delta_t / delta_it + (1 - smoothing) * avg_time ) if self.pos: self.moveto(self.pos) # Printing the bar's update sp( format_meter( n, self.total, elapsed, (dynamic_ncols(self.fp) if dynamic_ncols else ncols), self.desc, ascii, unit, unit_scale, 1 / avg_time if avg_time else None, bar_format, self.postfix, unit_divisor, ) ) if self.pos: self.moveto(-self.pos) # If no `miniters` was specified, adjust automatically # to the max iteration rate seen so far between 2 prints if dynamic_miniters: if maxinterval and delta_t >= maxinterval: # Adjust miniters to time interval by rule of 3 if mininterval: # Set miniters to correspond to mininterval miniters = delta_it * mininterval / delta_t else: # Set miniters to correspond to maxinterval miniters = delta_it * maxinterval / delta_t elif smoothing: # EMA-weight miniters to converge # towards the timeframe of mininterval miniters = ( smoothing * delta_it * ( mininterval / delta_t if mininterval and delta_t else 1 ) + (1 - smoothing) * miniters ) else: # Maximum nb of iterations between 2 prints miniters = max(miniters, delta_it) # Store old values for next call self.n = self.last_print_n = last_print_n = n self.last_print_t = last_print_t = cur_t self.miniters = miniters # Closing the progress bar. # Update some internal variables for close(). self.last_print_n = last_print_n self.n = n self.miniters = miniters self.close()
def __iter__(self): """Backward-compatibility to use: for x in tqdm(iterable)""" # Inlining instance variables as locals (speed optimisation) iterable = self.iterable # If the bar is disabled, then just walk the iterable # (note: keep this check outside the loop for performance) if self.disable: for obj in iterable: yield obj else: mininterval = self.mininterval maxinterval = self.maxinterval miniters = self.miniters dynamic_miniters = self.dynamic_miniters last_print_t = self.last_print_t last_print_n = self.last_print_n n = self.n smoothing = self.smoothing avg_time = self.avg_time _time = self._time try: sp = self.sp except AttributeError: raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) for obj in iterable: yield obj # Update and possibly print the progressbar. # Note: does not call self.update(1) for speed optimisation. n += 1 # check counter first to avoid calls to time() if n - last_print_n >= self.miniters: miniters = self.miniters # watch monitoring thread changes delta_t = _time() - last_print_t if delta_t >= mininterval: cur_t = _time() delta_it = n - last_print_n # EMA (not just overall average) if smoothing and delta_t and delta_it: avg_time = ( delta_t / delta_it if avg_time is None else smoothing * delta_t / delta_it + (1 - smoothing) * avg_time ) self.n = n with self._lock: if self.pos: self.moveto(abs(self.pos)) # Print bar update sp(self.__repr__()) if self.pos: self.moveto(-abs(self.pos)) # If no `miniters` was specified, adjust automatically # to the max iteration rate seen so far between 2 prints if dynamic_miniters: if maxinterval and delta_t >= maxinterval: # Adjust miniters to time interval by rule of 3 if mininterval: # Set miniters to correspond to mininterval miniters = delta_it * mininterval / delta_t else: # Set miniters to correspond to maxinterval miniters = delta_it * maxinterval / delta_t elif smoothing: # EMA-weight miniters to converge # towards the timeframe of mininterval miniters = ( smoothing * delta_it * ( mininterval / delta_t if mininterval and delta_t else 1 ) + (1 - smoothing) * miniters ) else: # Maximum nb of iterations between 2 prints miniters = max(miniters, delta_it) # Store old values for next call self.n = self.last_print_n = last_print_n = n self.last_print_t = last_print_t = cur_t self.miniters = miniters # Closing the progress bar. # Update some internal variables for close(). self.last_print_n = last_print_n self.n = n self.miniters = miniters self.close()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def update(self, n=1): """ Manually update the progress bar, useful for streams such as reading files. E.g.: >>> t = tqdm(total=filesize) # Initialise >>> for current_buffer in stream: ... ... ... t.update(len(current_buffer)) >>> t.close() The last line is highly recommended, but possibly not necessary if `t.update()` will be called in such a way that `filesize` will be exactly reached and printed. Parameters ---------- n : int Increment to add to the internal counter of iterations [default: 1]. """ if self.disable: return if n < 0: raise ValueError("n ({0}) cannot be negative".format(n)) self.n += n if self.n - self.last_print_n >= self.miniters: # We check the counter first, to reduce the overhead of time() delta_t = self._time() - self.last_print_t if delta_t >= self.mininterval: cur_t = self._time() delta_it = self.n - self.last_print_n # should be n? # elapsed = cur_t - self.start_t # EMA (not just overall average) if self.smoothing and delta_t and delta_it: self.avg_time = ( delta_t / delta_it if self.avg_time is None else self.smoothing * delta_t / delta_it + (1 - self.smoothing) * self.avg_time ) if not hasattr(self, "sp"): raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) if self.pos: self.moveto(self.pos) # Print bar's update self.sp(self.__repr__()) if self.pos: self.moveto(-self.pos) # If no `miniters` was specified, adjust automatically to the # maximum iteration rate seen so far between two prints. # e.g.: After running `tqdm.update(5)`, subsequent # calls to `tqdm.update()` will only cause an update after # at least 5 more iterations. if self.dynamic_miniters: if self.maxinterval and delta_t >= self.maxinterval: if self.mininterval: self.miniters = delta_it * self.mininterval / delta_t else: self.miniters = delta_it * self.maxinterval / delta_t elif self.smoothing: self.miniters = ( self.smoothing * delta_it * ( self.mininterval / delta_t if self.mininterval and delta_t else 1 ) + (1 - self.smoothing) * self.miniters ) else: self.miniters = max(self.miniters, delta_it) # Store old values for next call self.last_print_n = self.n self.last_print_t = cur_t
def update(self, n=1): """ Manually update the progress bar, useful for streams such as reading files. E.g.: >>> t = tqdm(total=filesize) # Initialise >>> for current_buffer in stream: ... ... ... t.update(len(current_buffer)) >>> t.close() The last line is highly recommended, but possibly not necessary if `t.update()` will be called in such a way that `filesize` will be exactly reached and printed. Parameters ---------- n : int, optional Increment to add to the internal counter of iterations [default: 1]. """ # N.B.: see __iter__() for more comments. if self.disable: return if n < 0: raise ValueError("n ({0}) cannot be negative".format(n)) self.n += n # check counter first to reduce calls to time() if self.n - self.last_print_n >= self.miniters: delta_t = self._time() - self.last_print_t if delta_t >= self.mininterval: cur_t = self._time() delta_it = self.n - self.last_print_n # >= n # elapsed = cur_t - self.start_t # EMA (not just overall average) if self.smoothing and delta_t and delta_it: self.avg_time = ( delta_t / delta_it if self.avg_time is None else self.smoothing * delta_t / delta_it + (1 - self.smoothing) * self.avg_time ) if not hasattr(self, "sp"): raise TqdmDeprecationWarning( """\ Please use `tqdm_gui(...)` instead of `tqdm(..., gui=True)` """, fp_write=getattr(self.fp, "write", sys.stderr.write), ) with self._lock: if self.pos: self.moveto(abs(self.pos)) # Print bar update self.sp(self.__repr__()) if self.pos: self.moveto(-abs(self.pos)) # If no `miniters` was specified, adjust automatically to the # maximum iteration rate seen so far between two prints. # e.g.: After running `tqdm.update(5)`, subsequent # calls to `tqdm.update()` will only cause an update after # at least 5 more iterations. if self.dynamic_miniters: if self.maxinterval and delta_t >= self.maxinterval: if self.mininterval: self.miniters = delta_it * self.mininterval / delta_t else: self.miniters = delta_it * self.maxinterval / delta_t elif self.smoothing: self.miniters = ( self.smoothing * delta_it * ( self.mininterval / delta_t if self.mininterval and delta_t else 1 ) + (1 - self.smoothing) * self.miniters ) else: self.miniters = max(self.miniters, delta_it) # Store old values for next call self.last_print_n = self.n self.last_print_t = cur_t
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def close(self): """ Cleanup and (if leave=False) close the progressbar. """ if self.disable: return # Prevent multiple closures self.disable = True # decrement instance pos and remove from internal set pos = self.pos self._decr_instances(self) # GUI mode if not hasattr(self, "sp"): return # annoyingly, _supports_unicode isn't good enough def fp_write(s): self.fp.write(_unicode(s)) try: fp_write("") except ValueError as e: if "closed" in str(e): return raise # pragma: no cover if pos: self.moveto(pos) if self.leave: if self.last_print_n < self.n: cur_t = self._time() # stats for overall rate (no weighted average) self.sp( self.format_meter( self.n, self.total, cur_t - self.start_t, (self.dynamic_ncols(self.fp) if self.dynamic_ncols else self.ncols), self.desc, self.ascii, self.unit, self.unit_scale, None, self.bar_format, self.postfix, self.unit_divisor, ) ) if pos: self.moveto(-pos) else: fp_write("\n") else: self.sp("") # clear up last bar if pos: self.moveto(-pos) else: fp_write("\r")
def close(self): """ Cleanup and (if leave=False) close the progressbar. """ if self.disable: return # Prevent multiple closures self.disable = True # decrement instance pos and remove from internal set pos = abs(self.pos) self._decr_instances(self) # GUI mode if not hasattr(self, "sp"): return # annoyingly, _supports_unicode isn't good enough def fp_write(s): self.fp.write(_unicode(s)) try: fp_write("") except ValueError as e: if "closed" in str(e): return raise # pragma: no cover with self._lock: if pos: self.moveto(pos) if self.leave: if self.last_print_n < self.n: # stats for overall rate (no weighted average) self.avg_time = None self.sp(self.__repr__()) if pos: self.moveto(-pos) else: fp_write("\n") else: self.sp("") # clear up last bar if pos: self.moveto(-pos) else: fp_write("\r")
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def set_description(self, desc=None): """ Set/modify description of the progress bar. """ self.desc = desc + ": " if desc else ""
def set_description(self, desc=None, refresh=True): """ Set/modify description of the progress bar. Parameters ---------- desc : str, optional refresh : bool, optional Forces refresh [default: True]. """ self.desc = desc + ": " if desc else "" if refresh: self.refresh()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def set_postfix(self, ordered_dict=None, **kwargs): """ Set/modify postfix (additional stats) with automatic formatting based on datatype. """ # Sort in alphabetical order to be more deterministic postfix = _OrderedDict([] if ordered_dict is None else ordered_dict) for key in sorted(kwargs.keys()): postfix[key] = kwargs[key] # Preprocess stats according to datatype for key in postfix.keys(): # Number: limit the length of the string if isinstance(postfix[key], Number): postfix[key] = "{0:2.3g}".format(postfix[key]) # Else for any other type, try to get the string conversion elif not isinstance(postfix[key], _basestring): postfix[key] = str(postfix[key]) # Else if it's a string, don't need to preprocess anything # Stitch together to get the final postfix self.postfix = ", ".join(key + "=" + postfix[key].strip() for key in postfix.keys())
def set_postfix(self, ordered_dict=None, refresh=True, **kwargs): """ Set/modify postfix (additional stats) with automatic formatting based on datatype. Parameters ---------- ordered_dict : dict or OrderedDict, optional refresh : bool, optional Forces refresh [default: True]. kwargs : dict, optional """ # Sort in alphabetical order to be more deterministic postfix = _OrderedDict([] if ordered_dict is None else ordered_dict) for key in sorted(kwargs.keys()): postfix[key] = kwargs[key] # Preprocess stats according to datatype for key in postfix.keys(): # Number: limit the length of the string if isinstance(postfix[key], Number): postfix[key] = "{0:2.3g}".format(postfix[key]) # Else for any other type, try to get the string conversion elif not isinstance(postfix[key], _basestring): postfix[key] = str(postfix[key]) # Else if it's a string, don't need to preprocess anything # Stitch together to get the final postfix self.postfix = ", ".join(key + "=" + postfix[key].strip() for key in postfix.keys()) if refresh: self.refresh()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def moveto(self, n): self.fp.write(_unicode("\n" * n + _term_move_up() * -n))
def moveto(self, n): self.fp.write(_unicode("\n" * n + _term_move_up() * -n)) self.fp.flush()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def clear(self, nomove=False): """ Clear current bar display """ if self.disable: return if not nomove: self.moveto(self.pos) # clear up the bar (can't rely on sp('')) self.fp.write("\r") self.fp.write(" " * (self.ncols if self.ncols else 10)) self.fp.write("\r") # place cursor back at the beginning of line if not nomove: self.moveto(-self.pos)
def clear(self, nolock=False): """ Clear current bar display """ if self.disable: return if not nolock: self._lock.acquire() self.moveto(abs(self.pos)) self.sp("") self.fp.write("\r") # place cursor back at the beginning of line self.moveto(-abs(self.pos)) if not nolock: self._lock.release()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def refresh(self): """ Force refresh the display of this bar """ if self.disable: return self.moveto(self.pos) # clear up this line's content (whatever there was) self.clear(nomove=True) # Print current/last bar state self.fp.write(self.__repr__()) self.moveto(-self.pos)
def refresh(self, nolock=False): """ Force refresh the display of this bar """ if self.disable: return if not nolock: self._lock.acquire() self.moveto(abs(self.pos)) self.sp(self.__repr__()) self.moveto(-abs(self.pos)) if not nolock: self._lock.release()
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _is_utf(encoding): return encoding.lower().startswith("utf-") or ("U8" == encoding)
def _is_utf(encoding): try: "\u2588\u2589".encode(encoding) except UnicodeEncodeError: # pragma: no cover return False except Exception: # pragma: no cover try: return encoding.lower().startswith("utf-") or ("U8" == encoding) except: return False else: return True
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _supports_unicode(file): return ( _is_utf(file.encoding) if ( getattr(file, "encoding", None) or # FakeStreams from things like bpython-curses can lie getattr(file, "interface", None) ) else False ) # pragma: no cover
def _supports_unicode(fp): try: return _is_utf(fp.encoding) except AttributeError: return False
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _environ_cols_windows(fp): # pragma: no cover try: from ctypes import windll, create_string_buffer import struct from sys import stdin, stdout io_handle = None if fp == stdin: io_handle = -10 elif fp == stdout: io_handle = -11 else: # assume stderr io_handle = -12 h = windll.kernel32.GetStdHandle(io_handle) csbi = create_string_buffer(22) res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) if res: ( _bufx, _bufy, _curx, _cury, _wattr, left, _top, right, _bottom, _maxx, _maxy, ) = struct.unpack("hhhhHhhhhhh", csbi.raw) # nlines = bottom - top + 1 return right - left # +1 except: pass return None
def _environ_cols_windows(fp): # pragma: no cover try: from ctypes import windll, create_string_buffer import struct from sys import stdin, stdout io_handle = -12 # assume stderr if fp == stdin: io_handle = -10 elif fp == stdout: io_handle = -11 h = windll.kernel32.GetStdHandle(io_handle) csbi = create_string_buffer(22) res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) if res: ( _bufx, _bufy, _curx, _cury, _wattr, left, _top, right, _bottom, _maxx, _maxy, ) = struct.unpack("hhhhHhhhhhh", csbi.raw) # nlines = bottom - top + 1 return right - left # +1 except: pass return None
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def _environ_cols_tput(*args): # pragma: no cover """cygwin xterm (windows)""" try: import shlex cols = int(subprocess.check_call(shlex.split("tput cols"))) # rows = int(subprocess.check_call(shlex.split('tput lines'))) return cols except: pass return None
def _environ_cols_tput(*_): # pragma: no cover """cygwin xterm (windows)""" try: import shlex cols = int(subprocess.check_call(shlex.split("tput cols"))) # rows = int(subprocess.check_call(shlex.split('tput lines'))) return cols except: pass return None
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def __reduce__(self): items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() inst_dict.pop("_keys", None) return (self.__class__, (items,), inst_dict)
def __reduce__(self): items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() inst_dict.pop("_keys", None) return self.__class__, (items,), inst_dict
https://github.com/conda/conda/issues/7040
[s1758208@login04(eddie) ~]$ conda create -n test [s1758208@login04(eddie) ~]$ conda activate test (test) [s1758208@login04(eddie) ~]$ conda install python Solving environment: done ## Package Plan ## environment location: /exports/csce/eddie/ph/groups/rbm_ml/michael/myconda/envs/test added / updated specs: - python The following packages will be downloaded: package | build ---------------------------|----------------- python-3.6.4 | hc3d631a_3 29.1 MB libstdcxx-ng-7.2.0 | hdf63c60_3 2.5 MB certifi-2018.1.18 | py36_0 144 KB zlib-1.2.11 | ha838bed_2 101 KB sqlite-3.22.0 | h1bed415_0 1.5 MB wheel-0.30.0 | py36hfd4bba0_1 67 KB openssl-1.0.2n | hb7f436b_0 3.4 MB libffi-3.2.1 | hd88cf55_4 43 KB libgcc-ng-7.2.0 | hdf63c60_3 6.1 MB ncurses-6.0 | h9df7e31_2 920 KB tk-8.6.7 | hc745277_3 3.2 MB setuptools-38.5.1 | py36_0 525 KB pip-9.0.1 | py36_5 2.2 MB libedit-3.1 | heed3624_0 171 KB ca-certificates-2017.08.26 | h1d4fec5_0 263 KB ------------------------------------------------------------ Total: 50.2 MB The following NEW packages will be INSTALLED: ca-certificates: 2017.08.26-h1d4fec5_0 certifi: 2018.1.18-py36_0 libedit: 3.1-heed3624_0 libffi: 3.2.1-hd88cf55_4 libgcc-ng: 7.2.0-hdf63c60_3 libstdcxx-ng: 7.2.0-hdf63c60_3 ncurses: 6.0-h9df7e31_2 openssl: 1.0.2n-hb7f436b_0 pip: 9.0.1-py36_5 python: 3.6.4-hc3d631a_3 readline: 7.0-ha6073c6_4 setuptools: 38.5.1-py36_0 sqlite: 3.22.0-h1bed415_0 tk: 8.6.7-hc745277_3 wheel: 0.30.0-py36hfd4bba0_1 xz: 5.2.3-h55aa19d_2 zlib: 1.2.11-ha838bed_2 Proceed ([y]/n)? y Downloading and Extracting Packages python 3.6.4: ########################################################## | 100% libstdcxx-ng 7.2.0: #################################################### | 100% certifi 2018.1.18: ##################################################### | 100% # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 255, in install handle_txn(progressive_fetch_extract, unlink_link_transaction, prefix, args, newenv) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 281, in handle_txn progressive_fetch_extract.execute() File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 584, in execute exc = self._execute_actions(prec_or_spec, prec_actions) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/core/package_cache.py", line 599, in _execute_actions progress_bar = ProgressBar(desc, not context.verbosity and not context.quiet, context.json) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 390, in __init__ self.pbar = tqdm(desc=description, bar_format=bar_format, ascii=True, total=1) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 388, in __new__ cls.monitor = TMonitor(cls, cls.monitor_interval) File "/home/s1758208/miniconda3/lib/python3.6/site-packages/conda/_vendor/tqdm/_tqdm.py", line 83, in __init__ self.start() File "/home/s1758208/miniconda3/lib/python3.6/threading.py", line 846, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread
RuntimeError
def explicit( specs, prefix, verbose=False, force_extract=True, index_args=None, index=None ): actions = defaultdict(list) actions["PREFIX"] = prefix fetch_specs = [] for spec in specs: if spec == "@EXPLICIT": continue if not is_url(spec): spec = unquote(path_to_url(expand(spec))) # parse URL m = url_pat.match(spec) if m is None: raise ParseError("Could not parse explicit URL: %s" % spec) url_p, fn, md5sum = m.group("url_p"), m.group("fn"), m.group("md5") url = join_url(url_p, fn) # url_p is everything but the tarball_basename and the md5sum fetch_specs.append(MatchSpec(url, md5=md5sum) if md5sum else MatchSpec(url)) if context.dry_run: raise DryRunExit() pfe = ProgressiveFetchExtract(fetch_specs) pfe.execute() # now make an UnlinkLinkTransaction with the PackageCacheRecords as inputs # need to add package name to fetch_specs so that history parsing keeps track of them correctly specs_pcrecs = tuple( [spec, next(PackageCacheData.query_all(spec), None)] for spec in fetch_specs ) assert not any(spec_pcrec[1] is None for spec_pcrec in specs_pcrecs) precs_to_remove = [] prefix_data = PrefixData(prefix) for q, (spec, pcrec) in enumerate(specs_pcrecs): new_spec = MatchSpec(spec, name=pcrec.name) specs_pcrecs[q][0] = new_spec prec = prefix_data.get(pcrec.name, None) if prec: precs_to_remove.append(prec) stp = PrefixSetup( prefix, precs_to_remove, tuple(sp[1] for sp in specs_pcrecs), (), tuple(sp[0] for sp in specs_pcrecs), ) txn = UnlinkLinkTransaction(stp) txn.execute()
def explicit( specs, prefix, verbose=False, force_extract=True, index_args=None, index=None ): actions = defaultdict(list) actions["PREFIX"] = prefix fetch_specs = [] for spec in specs: if spec == "@EXPLICIT": continue if not is_url(spec): spec = unquote(path_to_url(expand(spec))) # parse URL m = url_pat.match(spec) if m is None: raise ParseError("Could not parse explicit URL: %s" % spec) url_p, fn, md5sum = m.group("url_p"), m.group("fn"), m.group("md5") url = join_url(url_p, fn) # url_p is everything but the tarball_basename and the md5sum fetch_specs.append(MatchSpec(url, md5=md5sum) if md5sum else MatchSpec(url)) pfe = ProgressiveFetchExtract(fetch_specs) pfe.execute() # now make an UnlinkLinkTransaction with the PackageCacheRecords as inputs # need to add package name to fetch_specs so that history parsing keeps track of them correctly specs_pcrecs = tuple( [spec, next(PackageCacheData.query_all(spec), None)] for spec in fetch_specs ) assert not any(spec_pcrec[1] is None for spec_pcrec in specs_pcrecs) precs_to_remove = [] prefix_data = PrefixData(prefix) for q, (spec, pcrec) in enumerate(specs_pcrecs): new_spec = MatchSpec(spec, name=pcrec.name) specs_pcrecs[q][0] = new_spec prec = prefix_data.get(pcrec.name, None) if prec: precs_to_remove.append(prec) stp = PrefixSetup( prefix, precs_to_remove, tuple(sp[1] for sp in specs_pcrecs), (), tuple(sp[0] for sp in specs_pcrecs), ) txn = UnlinkLinkTransaction(stp) txn.execute()
https://github.com/conda/conda/issues/7094
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 812, in __call__ return func(*args, **kwargs) File "/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/anaconda/lib/python2.7/site-packages/conda/cli/main_create.py", line 11, in execute install(args, parser, 'create') File "/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 211, in install clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 72, in clone index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/misc.py", line 271, in clone_env force_extract=False, index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/misc.py", line 69, in explicit pfe.execute() File "/anaconda/lib/python2.7/site-packages/conda/core/package_cache_data.py", line 578, in execute assert not context.dry_run AssertionError
AssertionError
def clone_env(prefix1, prefix2, verbose=True, quiet=False, index_args=None): """ clone existing prefix1 into new prefix2 """ untracked_files = untracked(prefix1) # Discard conda, conda-env and any package that depends on them drecs = linked_data(prefix1) filter = {} found = True while found: found = False for dist, info in iteritems(drecs): name = info["name"] if name in filter: continue if name == "conda": filter["conda"] = dist found = True break if name == "conda-env": filter["conda-env"] = dist found = True break for dep in info.combined_depends: if MatchSpec(dep).name in filter: filter[name] = dist found = True if filter: if not quiet: fh = sys.stderr if context.json else sys.stdout print( "The following packages cannot be cloned out of the root environment:", file=fh, ) for pkg in itervalues(filter): print(" - " + pkg.dist_name, file=fh) drecs = { dist: info for dist, info in iteritems(drecs) if info["name"] not in filter } # Resolve URLs for packages that do not have URLs r = None index = {} unknowns = [dist for dist, info in iteritems(drecs) if not info.get("url")] notfound = [] if unknowns: index_args = index_args or {} index = get_index(**index_args) r = Resolve(index, sort=True) for dist in unknowns: name = dist.dist_name fn = dist.to_filename() fkeys = [d for d in r.index.keys() if r.index[d]["fn"] == fn] if fkeys: del drecs[dist] dist_str = sorted(fkeys, key=r.version_key, reverse=True)[0] drecs[Dist(dist_str)] = r.index[dist_str] else: notfound.append(fn) if notfound: raise PackagesNotFoundError(notfound) # Assemble the URL and channel list urls = {} for dist, info in iteritems(drecs): fkey = dist if fkey not in index: index[fkey] = PackageRecord.from_objects(info, not_fetched=True) r = None urls[dist] = info["url"] if r is None: r = Resolve(index) dists = r.dependency_sort({d.quad[0]: d for d in urls.keys()}) urls = [urls[d] for d in dists] precs = tuple(index[dist] for dist in dists) disallowed = tuple(MatchSpec(s) for s in context.disallowed_packages) for prec in precs: if any(d.match(prec) for d in disallowed): raise DisallowedPackageError(prec) if verbose: print("Packages: %d" % len(dists)) print("Files: %d" % len(untracked_files)) if context.dry_run: raise DryRunExit() for f in untracked_files: src = join(prefix1, f) dst = join(prefix2, f) dst_dir = dirname(dst) if islink(dst_dir) or isfile(dst_dir): rm_rf(dst_dir) if not isdir(dst_dir): os.makedirs(dst_dir) if islink(src): symlink(readlink(src), dst) continue try: with open(src, "rb") as fi: data = fi.read() except IOError: continue try: s = data.decode("utf-8") s = s.replace(prefix1, prefix2) data = s.encode("utf-8") except UnicodeDecodeError: # data is binary pass with open(dst, "wb") as fo: fo.write(data) shutil.copystat(src, dst) actions = explicit( urls, prefix2, verbose=not quiet, index=index, force_extract=False, index_args=index_args, ) return actions, untracked_files
def clone_env(prefix1, prefix2, verbose=True, quiet=False, index_args=None): """ clone existing prefix1 into new prefix2 """ untracked_files = untracked(prefix1) # Discard conda, conda-env and any package that depends on them drecs = linked_data(prefix1) filter = {} found = True while found: found = False for dist, info in iteritems(drecs): name = info["name"] if name in filter: continue if name == "conda": filter["conda"] = dist found = True break if name == "conda-env": filter["conda-env"] = dist found = True break for dep in info.combined_depends: if MatchSpec(dep).name in filter: filter[name] = dist found = True if filter: if not quiet: fh = sys.stderr if context.json else sys.stdout print( "The following packages cannot be cloned out of the root environment:", file=fh, ) for pkg in itervalues(filter): print(" - " + pkg.dist_name, file=fh) drecs = { dist: info for dist, info in iteritems(drecs) if info["name"] not in filter } # Resolve URLs for packages that do not have URLs r = None index = {} unknowns = [dist for dist, info in iteritems(drecs) if not info.get("url")] notfound = [] if unknowns: index_args = index_args or {} index = get_index(**index_args) r = Resolve(index, sort=True) for dist in unknowns: name = dist.dist_name fn = dist.to_filename() fkeys = [d for d in r.index.keys() if r.index[d]["fn"] == fn] if fkeys: del drecs[dist] dist_str = sorted(fkeys, key=r.version_key, reverse=True)[0] drecs[Dist(dist_str)] = r.index[dist_str] else: notfound.append(fn) if notfound: raise PackagesNotFoundError(notfound) # Assemble the URL and channel list urls = {} for dist, info in iteritems(drecs): fkey = dist if fkey not in index: index[fkey] = PackageRecord.from_objects(info, not_fetched=True) r = None urls[dist] = info["url"] if r is None: r = Resolve(index) dists = r.dependency_sort({d.quad[0]: d for d in urls.keys()}) urls = [urls[d] for d in dists] precs = tuple(index[dist] for dist in dists) disallowed = tuple(MatchSpec(s) for s in context.disallowed_packages) for prec in precs: if any(d.match(prec) for d in disallowed): raise DisallowedPackageError(prec) if verbose: print("Packages: %d" % len(dists)) print("Files: %d" % len(untracked_files)) for f in untracked_files: src = join(prefix1, f) dst = join(prefix2, f) dst_dir = dirname(dst) if islink(dst_dir) or isfile(dst_dir): rm_rf(dst_dir) if not isdir(dst_dir): os.makedirs(dst_dir) if islink(src): symlink(readlink(src), dst) continue try: with open(src, "rb") as fi: data = fi.read() except IOError: continue try: s = data.decode("utf-8") s = s.replace(prefix1, prefix2) data = s.encode("utf-8") except UnicodeDecodeError: # data is binary pass with open(dst, "wb") as fo: fo.write(data) shutil.copystat(src, dst) actions = explicit( urls, prefix2, verbose=not quiet, index=index, force_extract=False, index_args=index_args, ) return actions, untracked_files
https://github.com/conda/conda/issues/7094
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/anaconda/lib/python2.7/site-packages/conda/exceptions.py", line 812, in __call__ return func(*args, **kwargs) File "/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/anaconda/lib/python2.7/site-packages/conda/cli/main_create.py", line 11, in execute install(args, parser, 'create') File "/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 211, in install clone(args.clone, prefix, json=context.json, quiet=context.quiet, index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/cli/install.py", line 72, in clone index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/misc.py", line 271, in clone_env force_extract=False, index_args=index_args) File "/anaconda/lib/python2.7/site-packages/conda/misc.py", line 69, in explicit pfe.execute() File "/anaconda/lib/python2.7/site-packages/conda/core/package_cache_data.py", line 578, in execute assert not context.dry_run AssertionError
AssertionError
def box(self, instance, instance_type, val): if isinstance(val, string_types): val = val.replace(" ", ",").split(",") val = tuple(f for f in (ff.strip() for ff in val) if f) return super(_FeaturesField, self).box(instance, instance_type, val)
def box(self, instance, instance_type, val): if isinstance(val, string_types): val = val.replace(" ", ",").split(",") return super(_FeaturesField, self).box(instance, instance_type, val)
https://github.com/conda/conda/issues/6860
(base) [nwani@centos7-nwani scratch]$ conda install scratch -c local Solving environment: failed # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/nwani/m2/lib/python2.7/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 317, in solve_final_state conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 705, in get_conflicting_specs C = r2.gen_clauses() File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 505, in gen_clauses C.Require(C.Or, nkey, self.push_MatchSpec(C, ms)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) ...yada... ...yada... ...yada... File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 476, in push_MatchSpec ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 76, in __call__ return super(MatchSpecType, cls).__call__(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 178, in __init__ self._match_components = self._build_components(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 365, in _build_components return frozendict(_make(key, value) for key, value in iteritems(kwargs)) File "/home/nwani/m2/lib/python2.7/collections.py", line 69, in __init__ self.__update(*args, **kwds) File "/home/nwani/m2/lib/python2.7/_abcoll.py", line 564, in update if isinstance(other, Mapping): File "/home/nwani/m2/lib/python2.7/abc.py", line 141, in __instancecheck__ subtype in cls._abc_negative_cache): File "/home/nwani/m2/lib/python2.7/_weakrefset.py", line 75, in __contains__ return wr in self.data RuntimeError: maximum recursion depth exceeded in cmp `$ /home/nwani/m2/bin/conda install scratch -c local` environment variables: CIO_TEST=<not set> CONDA_DEFAULT_ENV=base CONDA_PREFIX=/home/nwani/m2 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=/home/nwani/m2/bin/python CONDA_ROOT=/home/nwani/m2 CONDA_SHLVL=1 PATH=/home/nwani/m2/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/ home/nwani/.local/bin:/home/nwani/bin REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : base active env location : /home/nwani/m2 shell level : 1 user config file : /home/nwani/.condarc populated config files : conda version : 4.4.9 conda-build version : 3.4.1 python version : 2.7.14.final.0 base environment : /home/nwani/m2 (writable) channel URLs : file:///home/nwani/m2/conda-bld/linux-64 file:///home/nwani/m2/conda-bld/noarch https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch package cache : /home/nwani/m2/pkgs /home/nwani/.conda/pkgs envs directories : /home/nwani/m2/envs /home/nwani/.conda/envs platform : linux-64 user-agent : conda/4.4.9 requests/2.18.4 CPython/2.7.14 Linux/3.10.0-693.5.2.el7.x86_64 centos/7 glibc/2.17 UID:GID : 1001:1001 netrc file : None offline mode : False An unexpected error has occurred. Conda has prepared the above report. If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: y Upload did not complete. Thank you for helping to improve conda. Opt-in to always sending reports (and not see this message again) by running $ conda config --set report_errors true
RuntimeError
def _convert(self, value): if not value: return frozenset() elif isinstance(value, string_types): return frozenset( f for f in (ff.strip() for ff in value.replace(" ", ",").split(",")) if f ) else: return frozenset(f for f in (ff.strip() for ff in value) if f)
def _convert(self, value): if isinstance(value, frozenset): return value elif not value: return frozenset() elif isinstance(value, string_types): return frozenset(value.replace(" ", ",").split(",")) else: return frozenset(value)
https://github.com/conda/conda/issues/6860
(base) [nwani@centos7-nwani scratch]$ conda install scratch -c local Solving environment: failed # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/nwani/m2/lib/python2.7/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 317, in solve_final_state conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 705, in get_conflicting_specs C = r2.gen_clauses() File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 505, in gen_clauses C.Require(C.Or, nkey, self.push_MatchSpec(C, ms)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) ...yada... ...yada... ...yada... File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 476, in push_MatchSpec ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 76, in __call__ return super(MatchSpecType, cls).__call__(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 178, in __init__ self._match_components = self._build_components(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 365, in _build_components return frozendict(_make(key, value) for key, value in iteritems(kwargs)) File "/home/nwani/m2/lib/python2.7/collections.py", line 69, in __init__ self.__update(*args, **kwds) File "/home/nwani/m2/lib/python2.7/_abcoll.py", line 564, in update if isinstance(other, Mapping): File "/home/nwani/m2/lib/python2.7/abc.py", line 141, in __instancecheck__ subtype in cls._abc_negative_cache): File "/home/nwani/m2/lib/python2.7/_weakrefset.py", line 75, in __contains__ return wr in self.data RuntimeError: maximum recursion depth exceeded in cmp `$ /home/nwani/m2/bin/conda install scratch -c local` environment variables: CIO_TEST=<not set> CONDA_DEFAULT_ENV=base CONDA_PREFIX=/home/nwani/m2 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=/home/nwani/m2/bin/python CONDA_ROOT=/home/nwani/m2 CONDA_SHLVL=1 PATH=/home/nwani/m2/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/ home/nwani/.local/bin:/home/nwani/bin REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : base active env location : /home/nwani/m2 shell level : 1 user config file : /home/nwani/.condarc populated config files : conda version : 4.4.9 conda-build version : 3.4.1 python version : 2.7.14.final.0 base environment : /home/nwani/m2 (writable) channel URLs : file:///home/nwani/m2/conda-bld/linux-64 file:///home/nwani/m2/conda-bld/noarch https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch package cache : /home/nwani/m2/pkgs /home/nwani/.conda/pkgs envs directories : /home/nwani/m2/envs /home/nwani/.conda/envs platform : linux-64 user-agent : conda/4.4.9 requests/2.18.4 CPython/2.7.14 Linux/3.10.0-693.5.2.el7.x86_64 centos/7 glibc/2.17 UID:GID : 1001:1001 netrc file : None offline mode : False An unexpected error has occurred. Conda has prepared the above report. If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: y Upload did not complete. Thank you for helping to improve conda. Opt-in to always sending reports (and not see this message again) by running $ conda config --set report_errors true
RuntimeError
def push_MatchSpec(self, C, spec): spec = MatchSpec(spec) sat_name = self.to_sat_name(spec) m = C.from_name(sat_name) if m is not None: # the spec has already been pushed onto the clauses stack return sat_name simple = spec._is_single() nm = spec.get_exact_value("name") tf = frozenset( _tf for _tf in (f.strip() for f in spec.get_exact_value("track_features") or ()) if _tf ) if nm: tgroup = libs = self.groups.get(nm, []) elif tf: assert len(tf) == 1 k = next(iter(tf)) tgroup = libs = self.trackers.get(k, []) else: tgroup = libs = self.index.keys() simple = False if not simple: libs = [fkey for fkey in tgroup if self.match(spec, fkey)] if len(libs) == len(tgroup): if spec.optional: m = True elif not simple: ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) m = C.from_name(self.push_MatchSpec(C, ms2)) if m is None: dists = [dist.full_name for dist in libs] if spec.optional: ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) dists.append("!" + self.to_sat_name(ms2)) m = C.Any(dists) C.name_var(m, sat_name) return sat_name
def push_MatchSpec(self, C, spec): spec = MatchSpec(spec) sat_name = self.to_sat_name(spec) m = C.from_name(sat_name) if m is not None: # the spec has already been pushed onto the clauses stack return sat_name simple = spec._is_single() nm = spec.get_exact_value("name") tf = spec.get_exact_value("track_features") if nm: tgroup = libs = self.groups.get(nm, []) elif tf: assert len(tf) == 1 k = next(iter(tf)) tgroup = libs = self.trackers.get(k, []) else: tgroup = libs = self.index.keys() simple = False if not simple: libs = [fkey for fkey in tgroup if self.match(spec, fkey)] if len(libs) == len(tgroup): if spec.optional: m = True elif not simple: ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) m = C.from_name(self.push_MatchSpec(C, ms2)) if m is None: dists = [dist.full_name for dist in libs] if spec.optional: ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) dists.append("!" + self.to_sat_name(ms2)) m = C.Any(dists) C.name_var(m, sat_name) return sat_name
https://github.com/conda/conda/issues/6860
(base) [nwani@centos7-nwani scratch]$ conda install scratch -c local Solving environment: failed # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "/home/nwani/m2/lib/python2.7/site-packages/conda/exceptions.py", line 789, in __call__ return func(*args, **kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in _main exit_code = do_call(args, p) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 77, in do_call exit_code = getattr(module, func_name)(args, parser) File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/main_install.py", line 11, in execute install(args, parser, 'install') File "/home/nwani/m2/lib/python2.7/site-packages/conda/cli/install.py", line 236, in install force_reinstall=context.force, File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 504, in solve_for_transaction force_remove, force_reinstall) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 437, in solve_for_diff final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove) File "/home/nwani/m2/lib/python2.7/site-packages/conda/core/solve.py", line 317, in solve_final_state conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 705, in get_conflicting_specs C = r2.gen_clauses() File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 505, in gen_clauses C.Require(C.Or, nkey, self.push_MatchSpec(C, ms)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) ...yada... ...yada... ...yada... File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 477, in push_MatchSpec m = C.from_name(self.push_MatchSpec(C, ms2)) File "/home/nwani/m2/lib/python2.7/site-packages/conda/resolve.py", line 476, in push_MatchSpec ms2 = MatchSpec(track_features=tf) if tf else MatchSpec(nm) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 76, in __call__ return super(MatchSpecType, cls).__call__(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 178, in __init__ self._match_components = self._build_components(**kwargs) File "/home/nwani/m2/lib/python2.7/site-packages/conda/models/match_spec.py", line 365, in _build_components return frozendict(_make(key, value) for key, value in iteritems(kwargs)) File "/home/nwani/m2/lib/python2.7/collections.py", line 69, in __init__ self.__update(*args, **kwds) File "/home/nwani/m2/lib/python2.7/_abcoll.py", line 564, in update if isinstance(other, Mapping): File "/home/nwani/m2/lib/python2.7/abc.py", line 141, in __instancecheck__ subtype in cls._abc_negative_cache): File "/home/nwani/m2/lib/python2.7/_weakrefset.py", line 75, in __contains__ return wr in self.data RuntimeError: maximum recursion depth exceeded in cmp `$ /home/nwani/m2/bin/conda install scratch -c local` environment variables: CIO_TEST=<not set> CONDA_DEFAULT_ENV=base CONDA_PREFIX=/home/nwani/m2 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=/home/nwani/m2/bin/python CONDA_ROOT=/home/nwani/m2 CONDA_SHLVL=1 PATH=/home/nwani/m2/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/ home/nwani/.local/bin:/home/nwani/bin REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> active environment : base active env location : /home/nwani/m2 shell level : 1 user config file : /home/nwani/.condarc populated config files : conda version : 4.4.9 conda-build version : 3.4.1 python version : 2.7.14.final.0 base environment : /home/nwani/m2 (writable) channel URLs : file:///home/nwani/m2/conda-bld/linux-64 file:///home/nwani/m2/conda-bld/noarch https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch package cache : /home/nwani/m2/pkgs /home/nwani/.conda/pkgs envs directories : /home/nwani/m2/envs /home/nwani/.conda/envs platform : linux-64 user-agent : conda/4.4.9 requests/2.18.4 CPython/2.7.14 Linux/3.10.0-693.5.2.el7.x86_64 centos/7 glibc/2.17 UID:GID : 1001:1001 netrc file : None offline mode : False An unexpected error has occurred. Conda has prepared the above report. If submitted, this report will be used by core maintainers to improve future releases of conda. Would you like conda to send this report to the core maintainers? [y/N]: y Upload did not complete. Thank you for helping to improve conda. Opt-in to always sending reports (and not see this message again) by running $ conda config --set report_errors true
RuntimeError
def __str__(self): try: return text_type(self.message % self._kwargs) except: debug_message = "\n".join( ( "class: " + self.__class__.__name__, "message:", self.message, "kwargs:", text_type(self._kwargs), "", ) ) sys.stderr.write(debug_message) raise
def __str__(self): try: return text_type(self.message % self._kwargs) except TypeError: # TypeError: not enough arguments for format string debug_message = "\n".join( ( "class: " + self.__class__.__name__, "message:", self.message, "kwargs:", text_type(self._kwargs), ) ) sys.stderr.write(debug_message) raise
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def dump_map(self): result = dict((k, v) for k, v in vars(self).items() if not k.startswith("_")) result.update( exception_type=text_type(type(self)), exception_name=self.__class__.__name__, message=text_type(self), error=repr(self), caused_by=repr(self._caused_by), **self._kwargs, ) return result
def dump_map(self): result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith("_")) result.update( exception_type=text_type(type(self)), exception_name=self.__class__.__name__, message=text_type(self), error=repr(self), caused_by=repr(self._caused_by), **self._kwargs, ) return result
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def _finalize(self, commands, ext): commands = concatv(commands, ("",)) # add terminating newline if ext is None: output = self.command_join.join(commands) if PY2: return ensure_binary(output) return output elif ext: with NamedTemporaryFile("w+b", suffix=ext, delete=False) as tf: # the default mode is 'w+b', and universal new lines don't work in that mode # command_join should account for that tf.write(ensure_binary(self.command_join.join(commands))) return tf.name else: raise NotImplementedError()
def _finalize(self, commands, ext): commands = concatv(commands, ("",)) # add terminating newline if ext is None: return self.command_join.join(commands) elif ext: with NamedTemporaryFile("w+b", suffix=ext, delete=False) as tf: # the default mode is 'w+b', and universal new lines don't work in that mode # command_join should account for that tf.write(ensure_binary(self.command_join.join(commands))) return tf.name else: raise NotImplementedError()
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def stdout_json(d): print(json_dump(d))
def stdout_json(d): import json from .._vendor.auxlib.entity import EntityEncoder json.dump(d, sys.stdout, indent=2, sort_keys=True, cls=EntityEncoder) sys.stdout.write("\n")
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def main(*args): # conda.common.compat contains only stdlib imports from ..common.compat import ensure_text_type # , init_std_stream_encoding # init_std_stream_encoding() if not args: args = sys.argv args = tuple(ensure_text_type(s) for s in args) if len(args) > 1: try: argv1 = args[1].strip() if argv1.startswith("shell."): from ..activate import main as activator_main return activator_main() elif argv1.startswith(".."): import conda.cli.activate as activate activate.main() return elif argv1 in ("activate", "deactivate"): from ..exceptions import CommandNotFoundError raise CommandNotFoundError(argv1) except Exception as e: _, exc_val, exc_tb = sys.exc_info() init_loggers() from ..exceptions import ExceptionHandler return ExceptionHandler().handle_exception(exc_val, exc_tb) from ..exceptions import conda_exception_handler return conda_exception_handler(_main, *args)
def main(*args): if not args: args = sys.argv args = tuple(_ensure_text_type(s) for s in args) if len(args) > 1: try: argv1 = args[1].strip() if argv1.startswith("shell."): from ..activate import main as activator_main return activator_main() elif argv1.startswith(".."): import conda.cli.activate as activate activate.main() return elif argv1 in ("activate", "deactivate"): from ..exceptions import CommandNotFoundError raise CommandNotFoundError(argv1) except Exception as e: _, exc_val, exc_tb = sys.exc_info() init_loggers() from ..exceptions import ExceptionHandler return ExceptionHandler().handle_exception(exc_val, exc_tb) from ..exceptions import conda_exception_handler return conda_exception_handler(_main, *args)
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def json_dump(object): return ensure_text_type( json.dumps( object, indent=2, sort_keys=True, separators=(",", ": "), cls=EntityEncoder ) )
def json_dump(object): return json.dumps( object, indent=2, sort_keys=True, separators=(",", ": "), cls=EntityEncoder )
https://github.com/conda/conda/issues/6899
$ source ~/anaconda/bin/activate Traceback (most recent call last): File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/gateways/logging.py", line 64, in emit msg = self.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 465, in format record.message = record.getMessage() File "/home/ondrej/anaconda/lib/python2.7/logging/__init__.py", line 329, in getMessage msg = msg % self.args File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 43, in __repr__ return '%s: %s' % (self.__class__.__name__, text_type(self)) File "/home/ondrej/anaconda/lib/python2.7/site-packages/conda/__init__.py", line 47, in __str__ return text_type(self.message % self._kwargs) ValueError: unsupported format character '{' (0x7b) at index 458 Logged from file exceptions.py, line 770 $ echo $ZSH_VERSION 5.3.1
ValueError
def rename(source_path, destination_path, force=False): if lexists(destination_path) and force: rm_rf(destination_path) if lexists(source_path): log.trace("renaming %s => %s", source_path, destination_path) try: os_rename(source_path, destination_path) except EnvironmentError as e: if e.errno in (EINVAL, EXDEV): # https://github.com/conda/conda/issues/6811 # https://github.com/conda/conda/issues/6711 log.trace( "Could not rename %s => %s due to errno [%s]. Falling back" " to copy/unlink", source_path, destination_path, e.errno, ) # https://github.com/moby/moby/issues/25409#issuecomment-238537855 # shutil.move() falls back to copy+unlink move(source_path, destination_path) else: raise else: log.trace("cannot rename; source path does not exist '%s'", source_path)
def rename(source_path, destination_path, force=False): if lexists(destination_path) and force: rm_rf(destination_path) if lexists(source_path): log.trace("renaming %s => %s", source_path, destination_path) try: os_rename(source_path, destination_path) except EnvironmentError as e: if e.errno in (EINVAL, EXDEV): # see https://github.com/conda/conda/issues/6711 log.trace( "Could not rename do to errno [%s]. Falling back to copy/remove.", e.errno, ) _copy_then_remove(source_path, destination_path) else: raise else: log.trace("cannot rename; source path does not exist '%s'", source_path)
https://github.com/conda/conda/issues/6811
<<HTTPS 200 OK < Accept-Ranges: bytes < Content-Disposition: attachment; filename="six-1.11.0-py35h423b573_1.tar.bz2"; filename*=UTF-8''six-1.11.0-py35h423b573_1.tar.bz2 < Content-Type: application/x-tar < Date: Mon, 29 Jan 2018 11:43:42 GMT < ETag: "576d38abfcb7ceb3b323b802b1fec665" < Last-Modified: Sat, 21 Oct 2017 18:55:29 GMT < Server: AmazonS3 < x-amz-id-2: IGiKj9lk7QKmYRYyZCVaUEM4Ax19T3slC8e1+ZVXTR3gT5Hg9UNd/8CxoS9yDWZt5PdfORpg9mo= < x-amz-request-id: 8A668C11FD79A607 < Content-Length: 21870 < Elapsed: 00:00.106578 TRACE conda.core.path_actions:execute(1238): extracting /opt/conda/pkgs/six-1.11.0-py35h423b573_1.tar.bz2 => /opt/conda/pkgs/six-1.11.0-py35h423b573_1 TRACE conda.gateways.disk.update:rename(60): renaming /opt/conda/pkgs/six-1.11.0-py35h423b573_1 => /opt/conda/pkgs/six-1.11.0-py35h423b573_1.c~ DEBUG conda.gateways.disk.create:extract_tarball(132): extracting /opt/conda/pkgs/six-1.11.0-py35h423b573_1.tar.bz2 to /opt/conda/pkgs/six-1.11.0-py35h423b573_1 TRACE conda.gateways.disk.create:write_as_json_to_file(61): writing json to file /opt/conda/pkgs/six-1.11.0-py35h423b573_1/info/repodata_record.json TRACE conda.gateways.disk.create:write_as_json_to_file(61): writing json to file /opt/conda/pkgs/six-1.11.0-py35h423b573_1/info/repodata_record.json TRACE conda.gateways.disk.delete:rm_rf(29): rm_rf /opt/conda/pkgs/six-1.11.0-py35h423b573_1.tar.bz2.c~ TRACE conda.gateways.disk.delete:rm_rf(29): rm_rf /opt/conda/pkgs/six-1.11.0-py35h423b573_1.c~ DEBUG conda.common.signals:signal_handler(56): de-registering handler for Signals.SIGIOT DEBUG conda.common.signals:signal_handler(56): de-registering handler for Signals.SIGINT DEBUG conda.common.signals:signal_handler(56): de-registering handler for Signals.SIGTERM DEBUG conda.common.signals:signal_handler(56): de-registering handler for Signals.SIGQUIT Traceback (most recent call last): File "/opt/conda/lib/python3.5/site-packages/conda/exceptions.py", line 772, in __call__ return func(*args, **kwargs) File "/opt/conda/lib/python3.5/site-packages/conda_env/cli/main.py", line 74, in do_call exit_code = getattr(module, func_name)(args, parser) File "/opt/conda/lib/python3.5/site-packages/conda_env/cli/main_update.py", line 107, in execute installer.install(prefix, specs, args, env) File "/opt/conda/lib/python3.5/site-packages/conda_env/installers/conda.py", line 38, in install pfe.execute() File "/opt/conda/lib/python3.5/site-packages/conda/core/package_cache.py", line 590, in execute raise CondaMultiError(exceptions) conda.CondaMultiError: [Errno 21] Is a directory: '/opt/conda/pkgs/ca-certificates-2017.08.26-h1d4fec5_0' [Errno 21] Is a directory: '/opt/conda/pkgs/libedit-3.1-heed3624_0'
conda.CondaMultiError
def list_parameters(self): UNLISTED_PARAMETERS = ( "bld_path", "conda_build", "croot", "debug", "default_python", "dry_run", "enable_private_envs", "error_upload_url", # should remain undocumented "force_32bit", "ignore_pinned", "migrated_custom_channels", "only_dependencies", "prune", "root_prefix", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA "update_dependencies", "use_local", ) return tuple( p for p in super(Context, self).list_parameters() if p not in UNLISTED_PARAMETERS )
def list_parameters(self): UNLISTED_PARAMETERS = ( "bld_path", "conda_build", "croot", "debug", "default_python", "dry_run", "enable_private_envs", "error_upload_url", # should remain undocumented "force_32bit", "ignore_pinned", "max_shlvl", "migrated_custom_channels", "only_dependencies", "prune", "root_prefix", "subdir", "subdirs", # https://conda.io/docs/config.html#disable-updating-of-dependencies-update-dependencies # NOQA # I don't think this documentation is correct any longer. # NOQA "target_prefix_override", # used to override prefix rewriting, for e.g. building docker containers or RPMs # NOQA "update_dependencies", "use_local", ) return tuple( p for p in super(Context, self).list_parameters() if p not in UNLISTED_PARAMETERS )
https://github.com/conda/conda/issues/6882
% conda create -n no-ipython humidity -c davidmertz -y # Silly example package [... creating ...] % conda activate no-ipython (no-ipython) % ipython Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 12:04:33) Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import humidity --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-5cdf29aced62> in <module>() ----> 1 import humidity ModuleNotFoundError: No module named 'humidity' In [2]: Do you really want to exit ([y]/n)? y (no-ipython) % which ipython /Users/dmertz/anaconda3/bin/ipython (no-ipython) % conda install ipython -y [... installing ...] (no-ipython) % which ipython /Users/dmertz/anaconda3/envs/no-ipython/bin/ipython (no-ipython) % ipython Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33) Type 'copyright', 'credits' or 'license' for more information IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: import humidity In [2]:
ModuleNotFoundError
def get_help_dict(): # this is a function so that most of the time it's not evaluated and loaded into memory return frozendict( { "add_anaconda_token": dals(""" In conjunction with the anaconda command-line client (installed with `conda install anaconda-client`), and following logging into an Anaconda Server API site using `anaconda login`, automatically apply a matching private token to enable access to private packages and channels. """), "add_pip_as_python_dependency": dals(""" Add pip, wheel and setuptools as dependencies of python. This ensures pip, wheel and setuptools will always be installed any time python is installed. """), "aggressive_update_packages": dals(""" A list of packages that, if installed, are always updated to the latest possible version. """), "allow_non_channel_urls": dals(""" Warn, but do not fail, when conda detects a channel url is not a valid channel. """), "allow_softlinks": dals(""" When allow_softlinks is True, conda uses hard-links when possible, and soft-links (symlinks) when hard-links are not possible, such as when installing on a different filesystem than the one that the package cache is on. When allow_softlinks is False, conda still uses hard-links when possible, but when it is not possible, conda copies files. Individual packages can override this setting, specifying that certain files should never be soft-linked (see the no_link option in the build recipe documentation). """), "always_copy": dals(""" Register a preference that files be copied into a prefix during install rather than hard-linked. """), "always_softlink": dals(""" Register a preference that files be soft-linked (symlinked) into a prefix during install rather than hard-linked. The link source is the 'pkgs_dir' package cache from where the package is being linked. WARNING: Using this option can result in corruption of long-lived conda environments. Package caches are *caches*, which means there is some churn and invalidation. With this option, the contents of environments can be switched out (or erased) via operations on other environments. """), "always_yes": dals(""" Automatically choose the 'yes' option whenever asked to proceed with a conda operation, such as when running `conda install`. """), "anaconda_upload": dals(""" Automatically upload packages built with conda build to anaconda.org. """), "auto_update_conda": dals(""" Automatically update conda when a newer or higher priority version is detected. """), "changeps1": dals(""" When using activate, change the command prompt ($PS1) to include the activated environment. """), "channel_alias": dals(""" The prepended url location to associate with channel names. """), "channel_priority": dals(""" When True, the solver is instructed to prefer channel order over package version. When False, the solver is instructed to give package version preference over channel priority. """), "channels": dals(""" The list of conda channels to include for relevant operations. """), "client_ssl_cert": dals(""" A path to a single file containing a private key and certificate (e.g. .pem file). Alternately, use client_ssl_cert_key in conjuction with client_ssl_cert for individual files. """), "client_ssl_cert_key": dals(""" Used in conjunction with client_ssl_cert for a matching key file. """), "clobber": dals(""" Allow clobbering of overlapping file paths within packages, and suppress related warnings. Overrides the path_conflict configuration value when set to 'warn' or 'prevent'. """), "create_default_packages": dals(""" Packages that are by default added to a newly created environments. """), # TODO: This is a bad parameter name. Consider an alternate. "custom_channels": dals(""" A map of key-value pairs where the key is a channel name and the value is a channel location. Channels defined here override the default 'channel_alias' value. The channel name (key) is not included in the channel location (value). For example, to override the location of the 'conda-forge' channel where the url to repodata is https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json, add an entry 'conda-forge: https://anaconda-repo.dev/packages'. """), "custom_multichannels": dals(""" A multichannel is a metachannel composed of multiple channels. The two reserved multichannels are 'defaults' and 'local'. The 'defaults' multichannel is customized using the 'default_channels' parameter. The 'local' multichannel is a list of file:// channel locations where conda-build stashes successfully-built packages. Other multichannels can be defined with custom_multichannels, where the key is the multichannel name and the value is a list of channel names and/or channel urls. """), "default_channels": dals(""" The list of channel names and/or urls used for the 'defaults' multichannel. """), # 'default_python': dals(""" # specifies the default major & minor version of Python to be used when # building packages with conda-build. Also used to determine the major # version of Python (2/3) to be used in new environments. Defaults to # the version used by conda itself. # """), "disallow": dals(""" Package specifications to disallow installing. The default is to allow all packages. """), "download_only": dals(""" Solve an environment and ensure package caches are populated, but exit prior to unlinking and linking packages into the prefix """), "envs_dirs": dals(""" The list of directories to search for named environments. When creating a new named environment, the environment will be placed in the first writable location. """), "force": dals(""" Override any of conda's objections and safeguards for installing packages and potentially breaking environments. Also re-installs the package, even if the package is already installed. Implies --no-deps. """), # 'force_32bit': dals(""" # CONDA_FORCE_32BIT should only be used when running conda-build (in order # to build 32-bit packages on a 64-bit system). We don't want to mention it # in the documentation, because it can mess up a lot of things. # """), "json": dals(""" Ensure all output written to stdout is structured json. """), "local_repodata_ttl": dals(""" For a value of False or 0, always fetch remote repodata (HTTP 304 responses respected). For a value of True or 1, respect the HTTP Cache-Control max-age header. Any other positive integer values is the number of seconds to locally cache repodata before checking the remote server for an update. """), "max_shlvl": dals(""" The maximum number of stacked active conda environments. """), "migrated_channel_aliases": dals(""" A list of previously-used channel_alias values, useful for example when switching between different Anaconda Repository instances. """), "no_dependencies": dals(""" Do not install, update, remove, or change dependencies. This WILL lead to broken environments and inconsistent behavior. Use at your own risk. """), "non_admin_enabled": dals(""" Allows completion of conda's create, install, update, and remove operations, for non-privileged (non-root or non-administrator) users. """), "notify_outdated_conda": dals(""" Notify if a newer version of conda is detected during a create, install, update, or remove operation. """), "offline": dals(""" Restrict conda to cached download content and file:// based urls. """), "override_channels_enabled": dals(""" Permit use of the --overide-channels command-line flag. """), "path_conflict": dals(""" The method by which conda handle's conflicting/overlapping paths during a create, install, or update operation. The value must be one of 'clobber', 'warn', or 'prevent'. The '--clobber' command-line flag or clobber configuration parameter overrides path_conflict set to 'prevent'. """), "pinned_packages": dals(""" A list of package specs to pin for every environment resolution. This parameter is in BETA, and its behavior may change in a future release. """), "pkgs_dirs": dals(""" The list of directories where locally-available packages are linked from at install time. Packages not locally available are downloaded and extracted into the first writable directory. """), "proxy_servers": dals(""" A mapping to enable proxy settings. Keys can be either (1) a scheme://hostname form, which will match any request to the given scheme and exact hostname, or (2) just a scheme, which will match requests to that scheme. Values are are the actual proxy server, and are of the form 'scheme://[user:password@]host[:port]'. The optional 'user:password' inclusion enables HTTP Basic Auth with your proxy. """), "quiet": dals(""" Disable progress bar display and other output. """), "remote_connect_timeout_secs": dals(""" The number seconds conda will wait for your client to establish a connection to a remote url resource. """), "remote_max_retries": dals(""" The maximum number of retries each HTTP connection should attempt. """), "remote_read_timeout_secs": dals(""" Once conda has connected to a remote resource and sent an HTTP request, the read timeout is the number of seconds conda will wait for the server to send a response. """), "report_errors": dals(""" Opt in, or opt out, of automatic error reporting to core maintainers. Error reports are anonymous, with only the error stack trace and information given by `conda info` being sent. """), "rollback_enabled": dals(""" Should any error occur during an unlink/link transaction, revert any disk mutations made to that point in the transaction. """), "safety_checks": dals(""" Enforce available safety guarantees during package installation. The value must be one of 'enabled', 'warn', or 'disabled'. """), "shortcuts": dals(""" Allow packages to create OS-specific shortcuts (e.g. in the Windows Start Menu) at install time. """), "show_channel_urls": dals(""" Show channel URLs when displaying what is going to be downloaded. """), "ssl_verify": dals(""" Conda verifies SSL certificates for HTTPS requests, just like a web browser. By default, SSL verification is enabled, and conda operations will fail if a required url's certificate cannot be verified. Setting ssl_verify to False disables certification verificaiton. The value for ssl_verify can also be (1) a path to a CA bundle file, or (2) a path to a directory containing certificates of trusted CA. """), "track_features": dals(""" A list of features that are tracked by default. An entry here is similar to adding an entry to the create_default_packages list. """), "use_index_cache": dals(""" Use cache of channel index files, even if it has expired. """), "use_pip": dals(""" Include non-conda-installed python packages with conda list. This does not affect any conda command or functionality other than the output of the command conda list. """), "verbosity": dals(""" Sets output log level. 0 is warn. 1 is info. 2 is debug. 3 is trace. """), "whitelist_channels": dals(""" The exclusive list of channels allowed to be used on the system. Use of any other channels will result in an error. If conda-build channels are to be allowed, along with the --use-local command line flag, be sure to include the 'local' channel in the list. If the list is empty or left undefined, no channel exclusions will be enforced. """), } )
def get_help_dict(): # this is a function so that most of the time it's not evaluated and loaded into memory return frozendict( { "add_anaconda_token": dals(""" In conjunction with the anaconda command-line client (installed with `conda install anaconda-client`), and following logging into an Anaconda Server API site using `anaconda login`, automatically apply a matching private token to enable access to private packages and channels. """), "add_pip_as_python_dependency": dals(""" Add pip, wheel and setuptools as dependencies of python. This ensures pip, wheel and setuptools will always be installed any time python is installed. """), "aggressive_update_packages": dals(""" A list of packages that, if installed, are always updated to the latest possible version. """), "allow_non_channel_urls": dals(""" Warn, but do not fail, when conda detects a channel url is not a valid channel. """), "allow_softlinks": dals(""" When allow_softlinks is True, conda uses hard-links when possible, and soft-links (symlinks) when hard-links are not possible, such as when installing on a different filesystem than the one that the package cache is on. When allow_softlinks is False, conda still uses hard-links when possible, but when it is not possible, conda copies files. Individual packages can override this setting, specifying that certain files should never be soft-linked (see the no_link option in the build recipe documentation). """), "always_copy": dals(""" Register a preference that files be copied into a prefix during install rather than hard-linked. """), "always_softlink": dals(""" Register a preference that files be soft-linked (symlinked) into a prefix during install rather than hard-linked. The link source is the 'pkgs_dir' package cache from where the package is being linked. WARNING: Using this option can result in corruption of long-lived conda environments. Package caches are *caches*, which means there is some churn and invalidation. With this option, the contents of environments can be switched out (or erased) via operations on other environments. """), "always_yes": dals(""" Automatically choose the 'yes' option whenever asked to proceed with a conda operation, such as when running `conda install`. """), "anaconda_upload": dals(""" Automatically upload packages built with conda build to anaconda.org. """), "auto_update_conda": dals(""" Automatically update conda when a newer or higher priority version is detected. """), "changeps1": dals(""" When using activate, change the command prompt ($PS1) to include the activated environment. """), "channel_alias": dals(""" The prepended url location to associate with channel names. """), "channel_priority": dals(""" When True, the solver is instructed to prefer channel order over package version. When False, the solver is instructed to give package version preference over channel priority. """), "channels": dals(""" The list of conda channels to include for relevant operations. """), "client_ssl_cert": dals(""" A path to a single file containing a private key and certificate (e.g. .pem file). Alternately, use client_ssl_cert_key in conjuction with client_ssl_cert for individual files. """), "client_ssl_cert_key": dals(""" Used in conjunction with client_ssl_cert for a matching key file. """), "clobber": dals(""" Allow clobbering of overlapping file paths within packages, and suppress related warnings. Overrides the path_conflict configuration value when set to 'warn' or 'prevent'. """), "create_default_packages": dals(""" Packages that are by default added to a newly created environments. """), # TODO: This is a bad parameter name. Consider an alternate. "custom_channels": dals(""" A map of key-value pairs where the key is a channel name and the value is a channel location. Channels defined here override the default 'channel_alias' value. The channel name (key) is not included in the channel location (value). For example, to override the location of the 'conda-forge' channel where the url to repodata is https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json, add an entry 'conda-forge: https://anaconda-repo.dev/packages'. """), "custom_multichannels": dals(""" A multichannel is a metachannel composed of multiple channels. The two reserved multichannels are 'defaults' and 'local'. The 'defaults' multichannel is customized using the 'default_channels' parameter. The 'local' multichannel is a list of file:// channel locations where conda-build stashes successfully-built packages. Other multichannels can be defined with custom_multichannels, where the key is the multichannel name and the value is a list of channel names and/or channel urls. """), "default_channels": dals(""" The list of channel names and/or urls used for the 'defaults' multichannel. """), # 'default_python': dals(""" # specifies the default major & minor version of Python to be used when # building packages with conda-build. Also used to determine the major # version of Python (2/3) to be used in new environments. Defaults to # the version used by conda itself. # """), "disallow": dals(""" Package specifications to disallow installing. The default is to allow all packages. """), "download_only": dals(""" Solve an environment and ensure package caches are populated, but exit prior to unlinking and linking packages into the prefix """), "envs_dirs": dals(""" The list of directories to search for named environments. When creating a new named environment, the environment will be placed in the first writable location. """), "force": dals(""" Override any of conda's objections and safeguards for installing packages and potentially breaking environments. Also re-installs the package, even if the package is already installed. Implies --no-deps. """), # 'force_32bit': dals(""" # CONDA_FORCE_32BIT should only be used when running conda-build (in order # to build 32-bit packages on a 64-bit system). We don't want to mention it # in the documentation, because it can mess up a lot of things. # """), "json": dals(""" Ensure all output written to stdout is structured json. """), "local_repodata_ttl": dals(""" For a value of False or 0, always fetch remote repodata (HTTP 304 responses respected). For a value of True or 1, respect the HTTP Cache-Control max-age header. Any other positive integer values is the number of seconds to locally cache repodata before checking the remote server for an update. """), "migrated_channel_aliases": dals(""" A list of previously-used channel_alias values, useful for example when switching between different Anaconda Repository instances. """), "no_dependencies": dals(""" Do not install, update, remove, or change dependencies. This WILL lead to broken environments and inconsistent behavior. Use at your own risk. """), "non_admin_enabled": dals(""" Allows completion of conda's create, install, update, and remove operations, for non-privileged (non-root or non-administrator) users. """), "notify_outdated_conda": dals(""" Notify if a newer version of conda is detected during a create, install, update, or remove operation. """), "offline": dals(""" Restrict conda to cached download content and file:// based urls. """), "override_channels_enabled": dals(""" Permit use of the --overide-channels command-line flag. """), "path_conflict": dals(""" The method by which conda handle's conflicting/overlapping paths during a create, install, or update operation. The value must be one of 'clobber', 'warn', or 'prevent'. The '--clobber' command-line flag or clobber configuration parameter overrides path_conflict set to 'prevent'. """), "pinned_packages": dals(""" A list of package specs to pin for every environment resolution. This parameter is in BETA, and its behavior may change in a future release. """), "pkgs_dirs": dals(""" The list of directories where locally-available packages are linked from at install time. Packages not locally available are downloaded and extracted into the first writable directory. """), "proxy_servers": dals(""" A mapping to enable proxy settings. Keys can be either (1) a scheme://hostname form, which will match any request to the given scheme and exact hostname, or (2) just a scheme, which will match requests to that scheme. Values are are the actual proxy server, and are of the form 'scheme://[user:password@]host[:port]'. The optional 'user:password' inclusion enables HTTP Basic Auth with your proxy. """), "quiet": dals(""" Disable progress bar display and other output. """), "remote_connect_timeout_secs": dals(""" The number seconds conda will wait for your client to establish a connection to a remote url resource. """), "remote_max_retries": dals(""" The maximum number of retries each HTTP connection should attempt. """), "remote_read_timeout_secs": dals(""" Once conda has connected to a remote resource and sent an HTTP request, the read timeout is the number of seconds conda will wait for the server to send a response. """), "report_errors": dals(""" Opt in, or opt out, of automatic error reporting to core maintainers. Error reports are anonymous, with only the error stack trace and information given by `conda info` being sent. """), "rollback_enabled": dals(""" Should any error occur during an unlink/link transaction, revert any disk mutations made to that point in the transaction. """), "safety_checks": dals(""" Enforce available safety guarantees during package installation. The value must be one of 'enabled', 'warn', or 'disabled'. """), "shortcuts": dals(""" Allow packages to create OS-specific shortcuts (e.g. in the Windows Start Menu) at install time. """), "show_channel_urls": dals(""" Show channel URLs when displaying what is going to be downloaded. """), "ssl_verify": dals(""" Conda verifies SSL certificates for HTTPS requests, just like a web browser. By default, SSL verification is enabled, and conda operations will fail if a required url's certificate cannot be verified. Setting ssl_verify to False disables certification verificaiton. The value for ssl_verify can also be (1) a path to a CA bundle file, or (2) a path to a directory containing certificates of trusted CA. """), "track_features": dals(""" A list of features that are tracked by default. An entry here is similar to adding an entry to the create_default_packages list. """), "use_index_cache": dals(""" Use cache of channel index files, even if it has expired. """), "use_pip": dals(""" Include non-conda-installed python packages with conda list. This does not affect any conda command or functionality other than the output of the command conda list. """), "verbosity": dals(""" Sets output log level. 0 is warn. 1 is info. 2 is debug. 3 is trace. """), "whitelist_channels": dals(""" The exclusive list of channels allowed to be used on the system. Use of any other channels will result in an error. If conda-build channels are to be allowed, along with the --use-local command line flag, be sure to include the 'local' channel in the list. If the list is empty or left undefined, no channel exclusions will be enforced. """), } )
https://github.com/conda/conda/issues/6882
% conda create -n no-ipython humidity -c davidmertz -y # Silly example package [... creating ...] % conda activate no-ipython (no-ipython) % ipython Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 12:04:33) Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import humidity --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-5cdf29aced62> in <module>() ----> 1 import humidity ModuleNotFoundError: No module named 'humidity' In [2]: Do you really want to exit ([y]/n)? y (no-ipython) % which ipython /Users/dmertz/anaconda3/bin/ipython (no-ipython) % conda install ipython -y [... installing ...] (no-ipython) % which ipython /Users/dmertz/anaconda3/envs/no-ipython/bin/ipython (no-ipython) % ipython Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33) Type 'copyright', 'credits' or 'license' for more information IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: import humidity In [2]:
ModuleNotFoundError