Skip to content

RuntimeError: Mosek library is not loaded #11

Answered by metab0t
Zhanwei-Liu asked this question in Q&A
Discussion options

You must be logged in to vote

Are you using the latest 0.2.4 version of PyOptInterface? Autoloading Mosek 10.2 is only added in 0.2.4.

Can you run ls /Users/energy/mosek/10.2/tools/platform/osxaarch64/bin/ to show its content?

You can run the script as follows to test why it cannot load the library:

import os
import platform
from pathlib import Path
import re
import logging

logging.basicConfig(level=logging.INFO)

from pyoptinterface import mosek

def detected_libraries():
    libs = []

    libname_pattern = {
        "Linux": r"libmosek64\.so",
        "Darwin": r"libmosek64\.dylib",
        "Windows": r"mosek64_(\d+)_(\d+)\.dll",
    }[platform.system()]
    suffix_pattern = {
        "Linux": "*.so",
        "Dar…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Zhanwei-Liu
Comment options

You must be logged in to vote
1 reply
@metab0t
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants