Failed creating Parallels driver: Parallels Virtualization SDK is not installed

Discussion in 'Parallels Desktop on a Mac with Apple silicon' started by Svpernova09, Mar 26, 2022.

  1. rjhornsby

    rjhornsby Bit poster

    Messages:
    3
    After poking around a bit more[1], my issue does indeed seem to be related to the python library symlink.
    The trick was that the instructions earlier in this thread about linking from python 3.8 needs to be changed to 3.9 - probably because of macOS version differences, since it is tied to the system python. This is probably going to break again when macOS rolls over to python 3.10, so it would be ideal if the installer (either Parallels proper or the SDK) could figure out how to create the symlink properly or otherwise place/look at/in the correct location for the library.

    Code:
    sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/prlsdkapi.pth \ 
         /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/prlsdkapi.pth
    Also helpful would be a more informative error message - "python library xxx not found at /some/path/to/a/library" rather than the more generic (and really, misleading) "the SDK is not installed"

    [1] https://github.com/hashicorp/packer-plugin-parallels/issues/36
     
    MiguelG9 and AlishaS2 like this.
  2. DavidM129

    DavidM129 Bit poster

    Messages:
    3
    Sadly this is now broken _again_ for me. It was fixed for a while and is no longer working with newer versions of Parallels and MacOS 12.

    I am running version 18.0.2-53077 for both Parallels and Parallels Virtualization SDK.
    Packer is version 1.8.3 (latest stable). This includes version 1.0.3 of the Parallels plugin for Packer.

    I tried the more recent workaround of:
    `sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/prlsdkapi.pth /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/prlsdkapi.pth`

    ...but that did not fix the problem for me (note the version of 3.9 instead of the aforementioned 3.8). That workaround was mentioned on the Packer Parallels plugin GitHub project here: https://github.com/hashicorp/packer-plugin-parallels/issues/36#issuecomment-1246209535.
     
  3. AshleyK1

    AshleyK1 Bit poster

    Messages:
    2
    This is also broken in macOS 13 Ventura with Packer 1.8.3 and Parallels Virtualization SDK 18.0.2-53077.

    The fix mentioned by other people resolved it for me too:
    Code:
    sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/prlsdkapi.pth /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/prlsdkapi.pth
     
  4. AshleyK1

    AshleyK1 Bit poster

    Messages:
    2
    This is also broken in macOS 13 Ventura with Packer 1.8.3 and Parallels Virtualization SDK 18.0.2-53077.
    The fix mentioned by other people resolved it for me too:
    Code:
    sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/prlsdkapi.pth /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/prlsdkapi.pth
     
  5. DogukanC

    DogukanC Bit poster

    Messages:
    3
    packer uses specifically /usr/bin/python3 and it might not be linked to python under /Library/Developer/CommandLineTools...
    If previous symlinks didn't work for you. The following command would probably work in any case.

    Code:
    PTH_FILE_SRC="$(find /Library/Frameworks/Python.framework -type f -name 'prlsdkapi.pth')"
    PTH_FILE_DEST_DIR=$(/usr/bin/python3 -c 'import sys;print([s for s in sys.path if "site-packages" in s][0])')
    sudo ln -s "${PTH_FILE_SRC}" "${PTH_FILE_DEST_DIR}/prlsdkapi.pth"
    
     
  6. MiguelG9

    MiguelG9 Bit poster

    Messages:
    1
    I had same problem with mac M1 Max Ventura 13.1, packer 1.8.4, parallels virtualization sdk 18.1.1. Running the command posted by rjhornsby solved the issue.
     
  7. MarkF23

    MarkF23 Bit poster

    Messages:
    1
    You can work around it by setting PYTHONPATH. You may have to adjust this based on the versions you have installed. Just check the path before copy/pasting this:

    Code:
    PYTHONPATH=/Library/Frameworks/ParallelsVirtualizationSDK.framework/Versions/10/Libraries/Python/3.7 packer build -only=parallels-iso.vm ...
    
     
    RichardD30 likes this.
  8. RichardD30

    RichardD30 Member

    Messages:
    27
    Awesome solution as it doesn't involve tinkering with host symlinks.
     
  9. rjhornsby

    rjhornsby Bit poster

    Messages:
    3
    This is still a bug/problem, and the error message "Parallels Virtualization SDK is not installed" is still as misleading as it was before, because clearly the package is installed.

    Code:
    Build 'parallels-iso.debian_12' errored ...: Failed creating Parallels driver: Parallels Virtualization SDK is not installed
    
    Package is installed:

    Code:
    $ pkgutil --pkgs | grep parallels
    com.parallels.pkg.sdk
    
    $ brew info parallels-virtualization-sdk
    ==> parallels-virtualization-sdk: 18.3.1-53614
    https://www.parallels.com/products/desktop/download/
    /opt/homebrew/Caskroom/parallels-virtualization-sdk/18.3.1-53614 (2 files, 44.3MB)
    
    Happy to update this post if I turn out to be wrong, but the symlink does not appear to be having any effect, so either it isn't the solution or something else has broken. Symlink exists as follows:

    Code:
    /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/prlsdkapi.pth 
        -> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/prlsdkapi.pth
    
     

Share This Page