Skip to content

Instantly share code, notes, and snippets.

@davidfokkema
Created December 7, 2023 14:43
Show Gist options
  • Save davidfokkema/6229045dcfe6eda113ee55acc3732d0e to your computer and use it in GitHub Desktop.
Save davidfokkema/6229045dcfe6eda113ee55acc3732d0e to your computer and use it in GitHub Desktop.
Copy libusb-1.0.dll from libusb-package to conda env root path
import json
import shutil
import subprocess
from pathlib import Path
output = subprocess.check_output("conda info --json", shell=True)
env_data = json.loads(output)
env_path = Path(env_data["active_prefix"])
dll_path = env_path / "Lib" / "site-packages" / "libusb_package" / "libusb-1.0.dll"
shutil.copy(dll_path, env_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment