MATLAB Answers

Error Installing MATLAB engine API for Python

292 views (last 30 days)
Ashleen Hayes
Ashleen Hayes on 13 Feb 2017
Commented: Autodidact LLC on 19 May 2021
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.
  6 Comments
Autodidact LLC
Autodidact LLC on 19 May 2021
I'm also having the same issue, Running as Administrator yet still getting Access Denied.

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!