I'll try to outline what the issue I'm facing in this post:
Issue
For some reason, the winpty
module cannot be imported in the base
mamba/conda environment on an AWS virtual machine I have running Windows Server 2016 running on an EC2 instance on AWS. Whenever I tried to import winpty
, I got this ImportError
:
ImportError: DLL load failed while importing winpty: The specified procedure could not be found.
However, when I installed mamba on my own local Windows machine (my Windows 10 laptop), winpty
which was installed to the base
mamba environment in my local machine can be imported with no issue.
I noticed this with other applications as well like Spyder
. For some reason, on the Windows Server 2016 virtual machine Spyder crashed when it's loaded but on my local machine Spyder IDE 5.1.5 can be loaded in base
mamba/conda environment with no issue whatsoever.
Below is the output of conda info
which will tell you all the details about the conda/mamba base
environment in my virtual machine:
active environment : base
active env location : C:\ProgramData\mambaforge
shell level : 1
user config file : C:\Users\<user_name>\.condarc
populated config files : C:\ProgramData\mambaforge\.condarc
C:\Users\<user_name>\.condarc
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.7.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\ProgramData\mambaforge (writable)
conda av data dir : C:\ProgramData\mambaforge\etc\conda
conda av metadata url : None
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
https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
package cache : C:\ProgramData\mambaforge\pkgs
C:\Users\<user_name>\.conda\pkgs
C:\Users\<user_name>\AppData\Local\conda\conda\pkgs
envs directories : C:\ProgramData\mambaforge\envs
C:\Users\<user_name>\.conda\envs
C:\Users\<user_name>\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Windows/10 Windows/10.0.19043
administrator : True
netrc file : None
offline mode : False
What have I Tried
I have tried:
- uninstalled mamba/reinstalled it
- create a new virtual environment called
test_mamba_env
and then in this new environment I:- ran
mamba install jupyterlab -c conda-forge
which will install jupyter lab along with winpty - tried to run
python
and then doimport winpty
and I got the sameImportErro
like the one below:
ImportError: DLL load failed while importing winpty: The specified procedure could not be found.
- ran
At this point I have no idea what caused the error in my virtual Windows Server 2016 machine.
Any help would be greatly appreciated!