MATLAB Answers

Error Installing MATLAB engine API for Python

345 views (last 30 days)
Ashleen Hayes
Ashleen Hayes on 13 Feb 2017
Commented: Reese Green on 21 Apr 2021 at 13:53
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!
  2 Comments

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.
  5 Comments
Reese Green
Reese Green on 21 Apr 2021 at 13:53
I am having the same issue as Yopu if anyone has ideas that would be great, tried changing permissions from properties but still doesn't work

Sign in to comment.

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

Community Treasure Hunt

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

Start Hunting!