C:>python “Program Files (x86)\ZED SDK\get_python_api.py”
→ Downloading to 'C:'
Detected platform:
win_amd64
Python 3.11
ZED SDK 4.0
→ Checking if https://download.stereolabs.com/zedsdk/4.0/whl/win_amd64/pyzed-4.0-cp311-cp311-win_amd64.whl exists and is available
Traceback (most recent call last):
File “C:\Program Files (x86)\ZED SDK\get_python_api.py”, 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\get_python_api.py”, 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:
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.
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.
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"
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
python get_python_api.py
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.