Install the Ocean SDK Locally

Note: You can also use a supported integrated development environment (IDE).

Create a Virtual Environment

When working with Python, you’ll often need install a number of packages using pip for each program you’re working on.  Since these packages are updated regularly and may sometimes conflict with each other, a good development practice is to create virtual environments. 

Using a tool like virtualenv, a virtual environment provides a separate development environment where you can install packages and run a program without changing or interfering with your system package and settings. 

Due to the frequency with which Python packages are modified, it’s a good idea to regularly create new virtual environments when working on an ongoing project.

Install the Ocean SDK

Follow these instructions to access and install the Ocean SDK (Python).

We recommend that you work in a virtual environment. If you are new to Python in virtual environments, see our Getting Started guidelines in the Ocean software documentation.

Note: If you have a 64-bit Windows OS and are running 32-bit Python, see also Are 32-bit and 64-bit Python Supported?

Command-line install:

  1. To set up the required dependencies, run the following command from your terminal:
    pip install dwave-ocean-sdk && dwave setup
  2. Follow the script and:
    • accept the terms and conditions,
    • agree to create a configuration file, and
    • answer the prompts to add your information to the config file.  
      • Paste your API token into your terminal when prompted. You can find your API token on the Leap Dashboard.
      • Paste your Solver API Endpoint into your terminal when prompted.  You can also find this on the Leap Dashboard, towards the bottom of the page.
      • All other settings can be left blank for default settings by hitting "Enter".
  3. You should now be able to connect to a D-Wave system. Verify with the following command: dwave ping.

Solve your own problems or begin with our end-to-end examples


Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request



Article is closed for comments.