Walk you through the steps to install the Amazon CodeWhisperer AI code generator in pycharm

Mondo Home Updated on 2024-01-28

Author: The omnipotent yang in this world

Article author: The omnipotent yang in this world

Amazon CodeWhisperer Official Website:

In the use of PyCharm, if you want to use Amazon CodeWhisperer, first click File and select Setting

Find plugins, search for "Amazon Toolkit" in the text box, and the Amazon Toolkit plugin will appear in the search results, and we can install the plugin by clicking on the "install" icon labeled.

After installation, PyCharm will automatically restart, and after restarting, the Amazon Toolkit will appear in the lower left corner, click the Amazon Toolkit, and then click the "Add Connection to Amazon" button to log in.

If you are using it for the first time, select "Use a personal email to sign up and sign in with Amazon Builder ID" by default, and then click "Connect".

After clicking, the interface shown in the following figure will pop up, and we will click on the "open and copy code" marked in the icon;

Then you will be redirected to a web browser to open the login screen, and we will paste the verification code in the code column shown in the figure, and click on it"next"Button.

If you don't have an account, you will create an account, fill in your email address and name in the location marked in the figure, and then click it"next"Button.

You will receive a verification code to the email address, copy the verification code.

Fill in the verification code in the picture and click it"next"button, the following figure will appear to set the password, after setting the password according to the requirements, click the "Create Amazon Builder ID" button.

After successful login, as shown in the figure below, we can click the "Allow" button marked in the icon to complete the authorization.

A small green box will pop up if the authorization is successful.

Return to pycharm and you'll be prompted, just click "yes".

The diagram indicates that the installation was successful, so that we can start using CodeWhisperer.

As we write, CodeWhisperer gives suggestions related to the current cursor position. As shown in the image above, we write a comment in the **edit window, such as "kmeans algorithm", and then press enter, we can see that the plugin gives us relevant suggestions, just need to directly accept or reject the suggestions by clicking the mouse, you can select "next" to continue generating, and then "insert code" to insert**. The more accurately your annotation description is written, the better the quality of the product.

Also, if we click"run security scan", we can ask CodeWhisperer to check yours for security vulnerabilities and give us recommendations to fix them. We may also accept or reject these suggestions with the click of a mouse, or modify them to meet actual usage requirements.

Related Pages