question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing ipykernel using conda fails

See original GitHub issue

Issue originally reported by @IanMatthewHuff https://github.com/microsoft/vscode-python/issues/9166#issuecomment-574427106

I’m not seeing this as validated either. With conda init run this is what I get in my terminal when I choose to install ipykernel. @DonJayamanne should I move back to backlog? Hard to know if this is expected with all the recent conda issues.

Loading personal and system profiles took 1244ms. (base) PS C:\github\Samples\DSPlayground> conda activate newEnv (newEnv) PS C:\github\Samples\DSPlayground> & C:/Anaconda3/envs/newEnv/python.exe c:/github/vscode-python-ianhu/pythonFiles/shell_exec.py C:/Anaconda3/Scripts/conda.exe install --name newEnv ipykernel -y C:/Users/ianhu/AppData/Local/Temp/tmp-30144xr1m596pS9pf.log Executing command in shell >> C:/Anaconda3/Scripts/conda.exe install --name newEnv ipykernel -y

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\conda\exceptions.py", line 1078, in __call__
    return func(*args, **kwargs)
  File "C:\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "C:\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "C:\Anaconda3\lib\site-packages\conda\cli\install.py", line 116, in install
    if context.use_only_tar_bz2:
  File "C:\Anaconda3\lib\site-packages\conda\base\context.py", line 668, in use_only_tar_bz2
    import conda_package_handling.api
  File "C:\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 3, in <module>
    from libarchive.exception import ArchiveError as _LibarchiveArchiveError
  File "C:\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
    from .entry import ArchiveEntry
  File "C:\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
    from . import ffi
  File "C:\Anaconda3\lib\site-packages\libarchive\ffi.py", line 27, in <module>
    libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
  File "C:\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
  File "C:\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None

$ C:\Anaconda3\Scripts\conda-script.py install --name newEnv ipykernel -y

environment variables: CIO_TEST=<not set> CONDA_DEFAULT_ENV=newEnv CONDA_EXE=C:\Anaconda3\Scripts\conda.exe CONDA_PREFIX=C:\Anaconda3\envs\newEnv CONDA_PREFIX_1=C:\Anaconda3 CONDA_PROMPT_MODIFIER=(newEnv) CONDA_PYTHON_EXE=C:\Anaconda3\python.exe CONDA_ROOT=C:\Anaconda3 CONDA_SHLVL=2 HOMEPATH=\Users\ianhu PATH=C:\Anaconda3\envs\newEnv;C:\Anaconda3\envs\newEnv\Library\mingw-w64\bi n;C:\Anaconda3\envs\newEnv\Library\usr\bin;C:\Anaconda3\envs\newEnv\Li brary\bin;C:\Anaconda3\envs\newEnv\Scripts;C:\Anaconda3\envs\newEnv\bi n;C:\Anaconda3\condabin;C:\Windows\system32;C:\Windows;C:\Windows\Syst em32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C :\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:
WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WIN DOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32
WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Users\ianhu\AppD ata\Local\Microsoft\WindowsApps;.;C:\Users\ianhu\AppData\Local\Program s\Microsoft VS Code\bin;C:\Users\ianhu\AppData\Roaming\npm;C:\Users\ia nhu\AppData\Local\Programs\Microsoft VS Code Insiders\bin PSMODULEPATH=C:\Users\ianhu\Documents\WindowsPowerShell\Modules;C:\Program Files\Wi ndowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Mod ules REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set>

 active environment : newEnv
active env location : C:\Anaconda3\envs\newEnv
        shell level : 2
   user config file : C:\Users\ianhu\.condarc

populated config files : C:\Users\ianhu.condarc conda version : 4.8.0 conda-build version : 3.17.6 python version : 3.7.1.final.0 virtual packages : __cuda=10.2 base environment : C:\Anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch 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 : C:\Anaconda3\pkgs C:\Users\ianhu.conda\pkgs C:\Users\ianhu\AppData\Local\conda\conda\pkgs envs directories : C:\Anaconda3\envs C:\Users\ianhu.conda\envs C:\Users\ianhu\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/4.8.0 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.18362 administrator : False netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

Upload successful. Traceback (most recent call last): File “c:/github/vscode-python-ianhu/pythonFiles/shell_exec.py”, line 26, in <module> subprocess.check_call(shell_args, stdout=sys.stdout, stderr=sys.stderr) File “C:\Anaconda3\envs\newEnv\lib\subprocess.py”, line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[‘C:/Anaconda3/Scripts/conda.exe’, ‘install’, ‘–name’, ‘newEnv’, ‘ipykernel’, ‘-y’]’ returned non-zero exit status 1.

(newEnv) PS C:\github\Samples\DSPlayground>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
IanMatthewHuffcommented, Jan 16, 2020

@DonJayamanne Closing

0reactions
DonJayamannecommented, Jan 16, 2020

@IanMatthewHuff Thanks. Shall we close this as validated. The problem was conda version 4.8.0 was busted, it broke a couple of other stuff as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected error while installing ipykernel #6286 - GitHub
However when running "conda install anaconda" it failed when trying to install ipykernel with the same error message.
Read more >
Conda environments not showing up in Jupyter Notebook
Just run conda install ipykernel in your new environment, only then you will get a kernel with this env. This works even if...
Read more >
Installing the IPython kernel — IPython 8.7.0 documentation
However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, you'll need...
Read more >
Avoiding update issues in Anaconda from 5.01 to 5.1
Before updating, I had Anaconda version 5.01 installed on my machine. I was attempting to update using conda update anaconda and ran into...
Read more >
New MP-API fails in Jupyter - Materials Project Data/API
I made a new conda environment with the Python 3.10.5 on CentOS 7.9 and ... and usually requires installing a specific kernel (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found