Getting Started

❗️

Before Continuing

If you have not already signed up and started your free trial, visit the home page and start your free trial

Video Tutorial

This is a quick overview of how to install, update and uninstall Artemis. Each command can be copied below.

Install Artemis

Artemis can be installed with a simple command-line pip installation:

python -m pip install artemis_labs
python -m pip install artemis_labs --upgrade

Setting Up Environmental Variables

If you have not already added your /local-packages/PythonXXX/Scripts folder to your environmental variables, you will see a yellow message that looks like this after installing Artemis

13481348

If you do not see this message, continue to the next section. If you do see this message, you will need to follow the steps below

  1. Copy the full path contained in the red box above.
  2. Open your Advanced System Properties. This is most easily done by searching “Edit the system environment variables” in your Windows menu. You should encounter Window 1 indicated below.
  3. Press Environment Variables. You should encounter Window 2 indicated below.
  4. In Window 2, scroll in the bottom box until you find a variable named “Path” and double click it. This will open Window 3 indicated below.
  5. In Window 3, press New and paste the text you copied from Command Prompt in the previous step.
  6. Click OK in each menu to confirm your changes.
13941394

Activating Your Installation

To activate your Artemis subscription, open a new Command Prompt window, and run the command below. Make sure to replace "YOUR_LICENSE_KEY_HERE" with the provided license key.

artemis_labs activate_license "YOUR_LICENSE_KEY_HERE"

Verify Your Installation

To verify successful installation and activation, open a new Command Prompt window, and run the commands below

artemis_labs

If everything is installed correctly, your console should display Artemis Labs followed by a list of supported commands

Updating Artemis

To update Artemis, open a new Command Prompt and run the commands below.

python -m pip install artemis_labs --upgrade

Integrating Artemis Into Your First Script

Now that Artemis is installed, you're ready to try it out! Let's start by creating a fresh Python script named my_script.py to test Artemis out! Once you've created that script, paste the sample script below into your blank Python file.

from time import sleep
import numpy as np
import matplotlib.pyplot as plt 

# @card title="Interactive Artemis Tutorial"
# @doc ### This interactive code example is controlled from comments on the right. Click on any card to see the comment that generated it.

# @card title="Important Tip" bg-color=rgb(195,66,63) text-color=rgb(0,0,0)
# @doc **Use the Continue button at the bottom of the screen to step through the tutorial**

# @card title="Input Parameters"
# @doc ### Enter a value for variable m, and press the Submit button 
# @input number data=m
# @doc ### Enter a value for variable b, and press the Submit button 
# @input number data=b

# @card title="Generating Data"
''' @blockdoc
Lets use the code below to data to generate linear data from the equation $$y=mx + b$$:
# @linkedcode start=data_start end=data_end
'''

# @marker data_start
x = np.arange(5)
y = 3.5 * x + 5.5
# @marker data_end

# @card title="Visualizing Raw Data"
# @doc Now let's visualize this data!
# @doc Our x data looks like:
# @output table data=x
# @doc Our y data looks like:
# @output table data=y

# @card title="Graphing Data"
# @doc Now let's plot our data as a line graph:
# @output line-graph data-x=x data-y=y title="Linear Data" xlabel="X" ylabel="Y" max-width=90%

Creating Your First Artemis Project

Once you've created your script that uses Artemis, we need to create an Artemis project file that we can run to launch your script. Type artemis_labs init into your console to create a default project file.

This should create a folder named artemis_project in the directory you ran your command. Inside this folder is a file named project.json. This file contains the settings for your project.

By default, project.json should look something like this:

{
    "name": "Artemis Project",
    "root_dir": "C:\\Users\\Austin McCoy\\Documents\\ArtemisMorpheusWeb",
    "entry_point": "main.py",
    "files": []
}

Configuring Your First Artemis Project

Now, let's go ahead and edit project.json to fit the needs of our project. Start by opening project.json in a text editor. You should see something like the following:

Here, name is your project's name, root_dir is the directory of your source code (this should be prefilled), entry_point is the script in your root_dir to run when launching your project, and files is a list of all the files in your source code which should be analyzed by Artemis for anchors.

Let's go ahead and update this configuration file to the following information (be sure to keep your root_dir and not just copy and paste it):

{
    "name": "Artemis Project",
    "root_dir": "C:\\Users\\Austin McCoy\\Documents\\ArtemisMorpheusWeb",
    "entry_point": "my_script.py",
    "files": ["my_script.py"]
}

Running Your First Script

Once you've saved your project.json file and your script, open up Command Prompt, and navigate to the directory containing your project folder using the cd command. Then, run your project by writing artemis_labs artemis_project.

You'll notice this time your code will be launched inside of Artemis and the browser below will appear. Note: this code appears in the browser, but it is running from a websocket which is disconnected from the internet.

19181918

Running Your First Script Video Walkthrough

Uninstalling Artemis

To uninstall Artemis, open a new Command Prompt, run the commands below, and press enter. Enter Y to confirm your choice when prompted.

python -m pip uninstall artemis_labs

Did this page help you?