Installation of ZED SDK from Anaconda environment

when doing intructions from ZED Python API within a Virtual Environment - Stereolabs I encounter the following problems when trying to run :

C:>python “Program Files (x86)\ZED SDK\”
→ Downloading to 'C:'
Detected platform:
Python 3.11
→ Checking if exists and is available
Traceback (most recent call last):
File “C:\Program Files (x86)\ZED SDK\”, line 180, in
open(whl_file, ‘wb’).write(r.content)
PermissionError: [Errno 13] Permission denied: ‘C:\pyzed-4.0-cp311-cp311-win_amd64.whl’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files (x86)\ZED SDK\”, line 183, in
except requests.exceptions.URLError as e:
AttributeError: module ‘requests.exceptions’ has no attribute ‘URLError’. Did you mean: ‘SSLError’?

I found myself the solution.
I knew there was a Access realted issue but thoughts about another too given the given errors. However, it was only due to access denies.
To solve the issue is doing so:
If you are not in the base Anaconda environment and need to run a script as an administrator from a different Anaconda environment, you can follow these steps:

  1. Open Anaconda Prompt as Administrator:
  • Search for “Anaconda Prompt” in the Start menu.
  • Right-click on “Anaconda Prompt” and select “Run as administrator”.
  • If prompted by the User Account Control (UAC) dialog, click “Yes” to allow the program to run with administrative privileges.
  1. Activate Your Desired Anaconda Environment:
  • Once the Anaconda Prompt is open with administrative privileges, activate the environment you want to use. For example, if your environment is named myenv, you would enter:

bashCopy code

conda activate myenv
  • Ensure that the environment has the necessary packages and Python version required for your script.
  1. Navigate to Your Script’s Location:
  • Use the cd command to navigate to the directory where your script is located. For example, if your script is in "C:\Program Files (x86)\ZED SDK", you would enter:

bashCopy code

cd "C:\Program Files (x86)\ZED SDK"
  1. Run Your Script:
  • With the Anaconda Prompt open in the correct directory, in the desired environment, and with administrative privileges, run your script using Python. For instance:

bashCopy code


By following these steps, you can run your script in any Anaconda environment with administrative privileges. Remember, running scripts with elevated privileges should be done carefully to avoid unintended system changes or security risks. Ensure that you trust the script and understand its functionality.

1 Like

Hey @Adrien,

Glad you found the solution, and thanks for the detailed report! :smiley: