Cannot Obtain Change Request in Digital Assistant

Hello,

I apologize in advance if this question seems silly. I’m totally new to this and trying to follow the instructions from this blog (How to Build a Digital Virtual Assistant in Python - ActiveState).

The problem I’m running into is in step 2, where I first have to import several libraries.
I’ve tried copypasting the code from the blog straight into the command prompt, and adding “state” in the beginning, and breaking up each line and typing or copying them in, with and without “state”.

If I don’t put “state” I get the error message “‘import’ is not recognized as an internal or external command, operable program or batch file.”

If I do put “state” in the beginning, I get “x Cannot obtain change request”.

Can someone help a total newb figure out where I’m messing up? Reading through the blog this process seemed simple enough that I thought I could do it, but now I’m feeling like I did 15 years ago when I failed Java Programming 101 :sweat_smile:.

TheOdinsdotttir,

Welcome to the ActiveState Platform! It sounds like you are confused about the role of the State Tool, which is only for creating and managing your Python environment and not required for Python programming.

As a rule of thumb:

  • whenever you need to use the “install” command (i.e., to install a package) use the State Tool: state install packagename
  • whenever you need to run Python code (like the “import” command), you’ll need to first launch the Python interpreter: running python3 will launch the interpreter

You may want to download an IDE to help you with your coding (i.e., to create the program that you can then run using the Python interpreter). More info on how to get started can be found here: Python For Beginners | Python.org

Hope that helps,