MATLAB Answers

Error Installing MATLAB engine API for Python

351 views (last 30 days)
Ashleen Hayes
Ashleen Hayes on 13 Feb 2017
Commented: Wenxiao Liu on 30 Oct 2020 at 11:54
I am trying to install the MATLAB engine for Python on my computer and when I write
python setup.py install
I get the following error:
error: could not create 'build': Access is denied
The same error also occurs when I try 'builddir'
I also have administrator access on my computer so I am confused as to why I am being denied.
Any help would be greatly appreciated!

  1 Comment

Aatman Mantri
Aatman Mantri on 31 Mar 2018
The same thing happened to me. Solution: Right click on Command Prompt and Run as Administrator. Problem solved!

Sign in to comment.

Accepted Answer

Bo Li
Bo Li on 13 Feb 2017
On Windows, you may need to run the prompt as administrator in order to write to protected folders even if you have administrator access.
Try to search "cmd" on Start and right click on it, select "Run as administrator" to see how it works.

More Answers (1)

Jed Frey
Jed Frey on 24 Oct 2017
A better solution, especially if you don't have Admin access to the machine, is to specify the build directory:
python setup.py build -b C:\Temp install

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!