custodian object not found exception

43 Views Asked by At

I am using Anaconda as python package manager, but I couldn't find the c7n module available in conda env to install.

So I installed c7n module using pip in anaconda prompt, but when I use conda list it is not showing c7n as installed.

I hope this issue already been resolved, can anyone let me know the missing piece here ?

Edit 1:

commands used in anaconda prompt

conda activate myenv
pip install c7n

After executing pip install I can see c7n is getting downloaded, but when i execute custodian schema in conda prompt itself, it is throwing below error.

Error:

'custodian' is not recognized as an internal or external command,
operable program or batch file.

By executing where python am getting below response.

Response:

c:\Users\rthiyagaraja\AppData\Roaming\Python\Python38\site-packages\python.exe
C:\Program Files\Python38\python.exe

when I tried downloading c7n again using pip command I got below response

Requirement already satisfied: C7n in c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages (0.9.33)
Requirement already satisfied: boto3==1.33.1 in c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages (from C7n) (1.33.1)
Requirement already satisfied: urllib3==1.26.18 in c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages (from C7n) (1.26.18)
Requirement already satisfied: jsonschema==4.20.0 in c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages (from C7n) (4.20.0)
Requirement already satisfied: argcomplete==3.1.6 in c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages (from C7n) (3.1.6)

so I have created new env out of this path by using below command in conda prompt

conda create --prefix c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages --copy python=3.8

and activated using below command

conda activate c:\users\rthiyagaraja\appdata\roaming\python\python38\site-packages

but when I list the installed packages it is not showing the c7n module, but when I try to install using pip it is showing C7n satisfied error which I mentioned above.

Edit 2: Answer (This is for those who are looking for answers)

Trying to install custodian in default env or conda env didn't worked.

So I installed in Virtual env, follow below steps.

python -m venv custodian 

.\custodian\scripts\activate 

pip install c7n

.\custodian\scripts\activate
0

There are 0 best solutions below