Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing ipykernel using conda fails #2422

Closed
DonJayamanne opened this issue Jan 15, 2020 · 7 comments
Closed

Installing ipykernel using conda fails #2422

DonJayamanne opened this issue Jan 15, 2020 · 7 comments

Comments

@DonJayamanne
Copy link
Contributor

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=
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=
SSL_CERT_FILE=

 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
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>

@DonJayamanne
Copy link
Contributor Author

@IanMatthewHuff If i remember correctly conda updated to 4.8.1 due to some bug in 4.8.0.
Please could you update conda to the latest version.

@IanMatthewHuff
Copy link
Member

So (still on 4.8) I see the following in the terminal:
conda install --name newEnv ipykernel -y Works
But
C:/Anaconda3/Scripts/conda.exe install --name newEnv ipykernel -y Fails

Which looks like the actual shell command that we are running.

@IanMatthewHuff
Copy link
Member

Will update to 4.8.1 to try there.

@IanMatthewHuff
Copy link
Member

Hmm, every thing from here seems to keep me pinned at 4.8.0.
https://docs.anaconda.com/anaconda/install/update-version/

Will poke around more.

@IanMatthewHuff
Copy link
Member

4.8.1 looks to work. Though I would say that I had to pull a new miniconda so it's not totally the same repro.

Loading personal and system profiles took 785ms.
(base) PS C:\Users\ianhu\Desktop\plots> conda activate cleanConda
(cleanConda) PS C:\Users\ianhu\Desktop\plots> & C:/Miniconda3/envs/cleanConda/python.exe c:/github/vscode-python-ianhu/pythonFiles/shell_exec.py C:/Miniconda3/Scripts/conda.exe install --name cleanConda ipykernel -y C:/Users/ianhu/AppData/Local/Temp/tmp-32608nslqbUgU4pGE.log
Executing command in shell >> C:/Miniconda3/Scripts/conda.exe install --name cleanConda ipykernel -y
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: C:\Miniconda3\envs\cleanConda

added / updated specs:
- ipykernel

@DonJayamanne
Copy link
Contributor Author

@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.

@IanMatthewHuff
Copy link
Member

@DonJayamanne Closing

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants