0

Our professor has given us the assignment of downloading and setting up... https://github.com/spyoungtech/hikvision-recover ...for a cyber security class

As stated I used pip to install from the command line. I then test to see if it was successful with pip show hikvision-recover and it is successful.

enter image description here

Yet, when I try to run the command on a windows shell I get a "Not recognized as an internal or external command." I'm assuming this has to do with the command not being found? But I'm not really sure where to start.

According to documentation I should just be able to

hikvision-recover <serial number> <Date information>

and it will return the recovery password.

Update: When I try python -m I get enter image description here

1
  • pip will have installed an executable to run hikvision-recover somewhere but since Windows doesn't have a standard path to place executables, it may not be in your %PATH% and so not findable on the command line. I don't know of an easy way to find out where this directory is but you could brute force it with dir /s hikvision-recover*. Once you find that path, add it to your user PATH. It may have other useful scripts from other installs. Commented Nov 7, 2020 at 18:33

2 Answers 2

1

The executable, if it was created, is not in your path. You can try:

python -m hikvision-recover <serial number> <Date information>

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks for the idea but when I try it (see update) it says "no module" by that name. I know the site package is there. I can navigate to it.
Sounds like the version python used for pip is not the same as for python. You can try calling python by path or you may have aliases for python3, python3.9, or python39. To work around this, you can reinstall with python -m pip install hikvision-recover
Thank you! Trying that it says it is a package and cannot be executed directly. I'm assuming I just need to utilize a script of some kind? Sorry, new to Python. Thanks for at least pointing me in the correct direction.
Ah, that's a Python 3 thing. Seems they haven't updated it to work with python3 in that way. You can work around this with python c:\users\<username>\appdata\roaming\python\python3.9\site-packages/hikvision_recover/__init__.py. That said, this is a workaround, so if you plan on doing more with Python, I would suggest getting your paths sorted.
It's also possible you can find a script in c:\users\<username>\appdata\roaming\python\python3.9\Scripts, but I'm not sure if it installs one or not.
|
1

It looks like the pip you used to install hikvision-recover is not the same version of python you are using. When installing a module, it is always a good practice to do the following on your command prompt:

where python 

It will show you which python executable the prompt will use where invoke python.

Double check pip is the same version as python:

where pip 

If the version are not the same, you need to modify your environment variable. Go Window menu - Edit the system environment variable - Environment variables - Path (User variable) and modify the order should you have more than one python version on the list.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.