Julia within Python - No module named 'dwave_sapi2

Hello,

I am trying to use ThreeQ package (Julia extension) in PyCharm. I have already configured separate Python virtual environment in Anaconda (3.6) and set it as working environment for PyCharm. I've installed several dwave packages: dwave-cloud-client, dwave-neal, dwave-networkx, dwave-qbsolv and dwave-sytem. That allows me to work with DWave through SAPI successfully so far.

Trouble comes with Julia - I am a newbie, so maybe I missed some obvious things.. anyway I installed julia-1.1.1 and configured PyCharm to be running it. Looks like Julia itself is working fine. I downloaded ThreeQ package as in the instruction here: https://github.com/omalled/ThreeQ.jl and I set the path as below:

push!(LOAD_PATH, <mypath>)

But when trying to run it, it said:

ERROR: InitError: PyError (PyImport_ImportModule

The Python package dwave_sapi2.local could not be found by pyimport. Usually this means

that you did not install dwave_sapi2.local in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution

installed by the Conda.jl package.  To install the dwave_sapi2.local module, you can

use `pyimport_conda("dwave_sapi2.local", PKG)`, where PKG is the Anaconda

package the contains the module dwave_sapi2.local, or alternatively you can use the

Conda package directly (via `using Conda` followed by `Conda.add` etcetera).

Alternatively, if you want to use a different Python distribution on your

system, such as a system-wide Python (as opposed to the Julia-specific Python),

you can re-configure PyCall with that Python.   As explained in the PyCall

documentation, set ENV["PYTHON"] to the path/name of the python executable

you want to use, run Pkg.build("PyCall"), and re-launch Julia.

 

So I changed Python distribution to be the same as the one that I am using in PyCharm (this conda env), but it throws the same error (with the correctly setup env). I tried to install dwave_sapi2 module, but it is not available in conda, PyCharm package manager, and when using pip it gives:

Collecting dwave_sapi2
ERROR: Could not find a version that satisfies the requirement dwave_sapi2 (from versions: none)
ERROR: No matching distribution found for dwave_sapi2

Anyone who can help out?

Thanks

Kasia

0

Comments

3 comments
  • Hello,

    Unfortunately, the library that you linked to is not one of ours that we develop.

    In addition, the sapi2 library that it references is only available to users with custom contracts with D-Wave.

    So, unfortunately it won't be possible to use this library unless it is adapted to be used with the ocean tools, and this would probably be something that would need to be discussed with the author of the code via GitHub.

    I hope this answers your question, and I apologize for the inconvenience.

    What are you looking to do with these libraries?

    Is there any documentation or libraries I might be able to point you towards?

     

    0
    Comment actions Permalink
  • Hello David,

    Thank you for the response! I am just researching on any kind of tools that would facilitate programming on D-Wave and found that - I wanted to play with it to see how it works, that's all.

    Anyway, thank you for your help!

    0
    Comment actions Permalink
  • No problem!

    A good place to look is on GitHub in the demos repo:
    https://github.com/dwavesystems/demos

    You can also look at the Jupyter Notebooks on the Leap home page:
    https://cloud.dwavesys.com/leap/examples

    Thanks for getting involved!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post