# Installation issues on MAC\_os High Sierra

**URL:** <https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451>\
**Category:** NuPIC\
**Created:** [February 9, 2018, 11:37pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451 "2018-02-09T23:37:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMZ](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AMZ](https://discourse.numenta.org/u/AMZ)\
**Post date:** [February 9, 2018, 11:37pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/1 "2018-02-09T23:37:42Z")

</div>

Hi,  
Trying to install nupic on my MAC but getting this error:  
IOError: [Errno 13] Permission denied: ‘/Users/…/Library/Python/2.7/bin/pytest’

This is a copy of the terminal:  
MacBook-Pro:~ AMZ$ pip install nupic --user  
Collecting nupic  
Using cached nupic-1.0.3-py2-none-any.whl  
Requirement already satisfied: psutil==1.0.1 in /Library/Python/2.7/site-packages (from nupic)  
Requirement already satisfied: DBUtils==1.1 in /Library/Python/2.7/site-packages (from nupic)  
Requirement already satisfied: PyYAML==3.10 in /Library/Python/2.7/site-packages (from nupic)  
Collecting nupic.bindings==1.0.0 (from nupic)  
Using cached nupic.bindings-1.0.0-cp27-cp27m-macosx\_10\_11\_intel.whl  
Collecting python-dateutil==2.1 (from nupic)  
Using cached python-dateutil-2.1.tar.gz  
Collecting validictory==0.9.1 (from nupic)  
Using cached validictory-0.9.1.tar.gz  
Collecting unittest2==0.5.1 (from nupic)  
Using cached unittest2-0.5.1.zip  
Collecting numpy==1.12.1 (from nupic)  
Using cached numpy-1.12.1-cp27-cp27m-macosx\_10\_6\_intel.macosx\_10\_9\_intel.macosx\_10\_9\_x86\_64.macosx\_10\_10\_intel.macosx\_10\_10\_x86\_64.whl  
Collecting asteval==0.9.1 (from nupic)  
Using cached asteval-0.9.1.tar.gz  
Requirement already satisfied: coverage==3.7.1 in ./Library/Python/2.7/lib/python/site-packages (from nupic)  
Collecting pytest-xdist==1.16.0 (from nupic)  
Using cached pytest-xdist-1.16.0.tar.gz  
Collecting prettytable==0.7.2 (from nupic)  
Using cached prettytable-0.7.2.zip  
Collecting pycapnp==0.5.12; platform\_system == “Linux” or platform\_system == “Darwin” (from nupic)  
Using cached pycapnp-0.5.12.tar.gz  
Requirement already satisfied: pytest-cov==2.5.0 in ./Library/Python/2.7/lib/python/site-packages (from nupic)  
Collecting pytest==3.0.7 (from nupic)  
Using cached pytest-3.0.7-py2.py3-none-any.whl  
Collecting pyproj==1.9.3 (from nupic)  
Using cached pyproj-1.9.3.tar.gz  
Collecting PyMySQL==0.6.2 (from nupic)  
Using cached PyMySQL-0.6.2-py2.py3-none-any.whl  
Collecting ordereddict==1.1 (from nupic)  
Using cached ordereddict-1.1.tar.gz  
Collecting mock==1.0.1 (from nupic)  
Using cached mock-1.0.1.zip  
Requirement already satisfied: six in ./Library/Python/2.7/lib/python/site-packages (from python-dateutil==2.1-\>nupic)  
Requirement already satisfied: execnet\>=1.1 in /Library/Python/2.7/site-packages (from pytest-xdist==1.16.0-\>nupic)  
Requirement already satisfied: py\>=1.4.22 in /Library/Python/2.7/site-packages (from pytest-xdist==1.16.0-\>nupic)  
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pytest==3.0.7-\>nupic)  
Requirement already satisfied: apipkg\>=1.4 in /Library/Python/2.7/site-packages (from execnet\>=1.1-\>pytest-xdist==1.16.0-\>nupic)  
Installing collected packages: pytest, pytest-xdist, numpy, pycapnp, nupic.bindings, python-dateutil, validictory, unittest2, asteval, prettytable, pyproj, PyMySQL, ordereddict, mock, nupic  
Exception:  
Traceback (most recent call last):  
File “/Library/Python/2.7/site-packages/pip/basecommand.py”, line 215, in main  
status = self.run(options, args)  
File “/Library/Python/2.7/site-packages/pip/commands/install.py”, line 342, in run  
prefix=options.prefix\_path,  
File “/Library/Python/2.7/site-packages/pip/req/req\_set.py”, line 784, in install  
\*\*kwargs  
File “/Library/Python/2.7/site-packages/pip/req/req\_install.py”, line 851, in install  
self.move\_wheel\_files(self.source\_dir, root=root, prefix=prefix)  
File “/Library/Python/2.7/site-packages/pip/req/req\_install.py”, line 1064, in move\_wheel\_files  
isolated=self.isolated,  
File “/Library/Python/2.7/site-packages/pip/wheel.py”, line 492, in move\_wheel\_files  
maker.make\_multiple([’%s = %s’ % kv for kv in console.items()])  
File “/Library/Python/2.7/site-packages/pip/\_vendor/distlib/scripts.py”, line 383, in make\_multiple  
filenames.extend(self.make(specification, options))  
File “/Library/Python/2.7/site-packages/pip/\_vendor/distlib/scripts.py”, line 372, in make  
self.\_make\_script(entry, filenames, options=options)  
File “/Library/Python/2.7/site-packages/pip/\_vendor/distlib/scripts.py”, line 276, in \_make\_script  
self.\_write\_script(scriptnames, shebang, script, filenames, ext)  
File “/Library/Python/2.7/site-packages/pip/\_vendor/distlib/scripts.py”, line 250, in \_write\_script  
self.\_fileop.write\_binary\_file(outname, script\_bytes)  
File “/Library/Python/2.7/site-packages/pip/\_vendor/distlib/util.py”, line 407, in write\_binary\_file  
with open(path, ‘wb’) as f:  
IOError: [Errno 13] Permission denied: ‘/Users/…/Library/Python/2.7/bin/pytest’

Any help is really appreciated.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [February 10, 2018, 4:18pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/2 "2018-02-10T16:18:46Z")

</div>

Do you have the right pip version as described [here](https://github.com/numenta/nupic#dependencies)?

---

<div class="post-metadata">

**Author:** ![AMZ](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AMZ](https://discourse.numenta.org/u/AMZ)\
**Post date:** [February 10, 2018, 7:02pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/3 "2018-02-10T19:02:29Z")

</div>

I have version: 9.01

MacBook-Pro:~ $ pip --version  
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [February 11, 2018, 1:20am UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/4 "2018-02-11T01:20:09Z")

</div>

Can you try installing pytest alone with sudo?

```
sudo pip install pytest
```

---

<div class="post-metadata">

**Author:** ![AMZ](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AMZ](https://discourse.numenta.org/u/AMZ)\
**Post date:** [February 11, 2018, 2:50am UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/5 "2018-02-11T02:50:15Z")

</div>

> [@rhyolight](#):
>
> sudo pip install pytest

I’m getting this:  
MacBook-Pro:~ $ sudo pip install pytest  
The directory ‘/Users/AMZ/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.  
The directory ‘/Users/AMZ/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.  
Requirement already satisfied: pytest in /Library/Python/2.7/site-packages  
Requirement already satisfied: pluggy\<0.7,\>=0.5 in /Library/Python/2.7/site-packages (from pytest)  
Requirement already satisfied: attrs\>=17.2.0 in /Library/Python/2.7/site-packages (from pytest)  
Requirement already satisfied: py\>=1.5.0 in /Library/Python/2.7/site-packages (from pytest)  
Requirement already satisfied: funcsigs; python\_version \< “3.0” in /Library/Python/2.7/site-packages (from pytest)  
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pytest)  
Requirement already satisfied: six\>=1.10.0 in ./Library/Python/2.7/lib/python/site-packages (from pytest)

I tried “sudo -H pip install pytest”, but I’m still getting the same issue with nupic!!!

Thanks,

---

<div class="post-metadata">

**Author:** ![abshej](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/abshej/32/1993_2.png) [@abshej](https://discourse.numenta.org/u/abshej)\
**Post date:** [February 11, 2018, 12:47pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/6 "2018-02-11T12:47:59Z")

</div>

Try using **chown** to get ownership of the files  
Or maybe **chmod** if that works on MAC OS

```auto
sudo chown -R $USER /Library/Python/2.7/bin/pytest

```

Try it using different paths, the above is just an example

---

<div class="post-metadata">

**Author:** ![AMZ](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AMZ](https://discourse.numenta.org/u/AMZ)\
**Post date:** [February 11, 2018, 2:49pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/7 "2018-02-11T14:49:43Z")

</div>

I have changed all folders and files to which I’m getting access denied to the chown mode. That works a little bit as more progress is achieved during the setup, but unfortunately a new error arise. This is the terminal output:

MacBook-Pro:~ $ pip install nupic --user  
Collecting nupic  
Using cached nupic-1.0.3-py2-none-any.whl …  
…  
capnp/lib/capnp.cpp:58877:39: warning: ‘getDependency’ is deprecated: Does not handle generics correctly. [-Wdeprecated-declarations]  
\_\_pyx\_t\_8 = \_\_pyx\_v\_self-\>thisptr.getDependency(\_\_pyx\_t\_7);  
^  
/usr/local/include/capnp/schema.h:85:43: note: ‘getDependency’ has been explicitly marked deprecated here  
Schema getDependency(uint64\_t id) const KJ\_DEPRECATED(“Does not handle generics correctly.”);  
^  
/usr/local/include/kj/common.h:192:20: note: expanded from macro 'KJ\_DEPRECATED’  
**attribute** ((deprecated(reason)))  
^  
capnp/lib/capnp.cpp:246:5: warning: destructor called on non-final ‘ErrorHandler’ that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]  
x-\>~T();  
^  
capnp/lib/capnp.cpp:81903:3: note: in instantiation of function template specialization ‘\_\_Pyx\_call\_destructor’ requested here  
\_\_Pyx\_call\_destructor(&p-\>\_error\_handler);  
^  
capnp/lib/capnp.cpp:246:9: note: qualify call to silence this warning  
x-\>~T();  
^  
ErrorHandler::  
23 warnings and 1 error generated.  
error: command ‘cc’ failed with exit status 1

```
----------------------------------------

```

Command “/usr/bin/python -u -c “import setuptools, tokenize; **file** =’/private/var/folders/nn/nlkk27m12kj4zbfxsqhgnj0m0000gn/T/pip-build-93u3g7/pycapnp/setup.py’;f=getattr(tokenize, ‘open’, open)( **file** );code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, **file** , ‘exec’))” install --record /var/folders/nn/nlkk27m12kj4zbfxsqhgnj0m0000gn/T/pip-qmhLYo-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /private/var/folders/nn/nlkk27m12kj4zbfxsqhgnj0m0000gn/T/pip-build-93u3g7/pycapnp/

FYI:  
I tried to use “export MACOSX\_DEPLOYMENT\_TARGET=10.10” but got error related to the configuration. Thus, I re-set the target to 10.13

Thank you…

---

<div class="post-metadata">

**Author:** ![abshej](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/abshej/32/1993_2.png) [@abshej](https://discourse.numenta.org/u/abshej)\
**Post date:** [February 11, 2018, 3:15pm UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/8 "2018-02-11T15:15:05Z")

</div>

I would recommend installing(reinstalling) **gcc** or **clang** and trying again. Preference is **gcc**.

> [@AMZ](#):
>
> error: command ‘cc’ failed with exit status 1

Also stackoverflow has much more information about this than this forum could hope to generate.

---

<div class="post-metadata">

**Author:** ![AMZ](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@AMZ](https://discourse.numenta.org/u/AMZ)\
**Post date:** [February 12, 2018, 2:44am UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/9 "2018-02-12T02:44:46Z")

</div>

I tried several suggestions but I’m getting the same error. I reinstalled xcode and clang but nothing changed!!! Also, tried the suggestions in this post but with no luck!!

> [@Installation issue on Mac OS Sierra - command 'cc' failed with exit status 1](https://discourse.numenta.org/t/installation-issue-on-mac-os-sierra-command-cc-failed-with-exit-status-1/2775):
>
> Hi, I am getting the error below when tying to install nupic for the first time. I have Mac OS Sierra 10.12.6, wondering if anyone can help me out here… This is doing the easy install, however I then tried doing from source and get the same error when running “pip install -r bindings/py/requirements.txt” for nupic.core Any help is appreciated, I am desperate to have a play with the amazing HTM algorithms! Here is full script from command line: \> Last login: Sun Sep 3 10:49:26 on ttys000 Ja…

Thanks,

---

<div class="post-metadata">

**Author:** ![abshej](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/abshej/32/1993_2.png) [@abshej](https://discourse.numenta.org/u/abshej)\
**Post date:** [February 12, 2018, 2:50am UTC](https://discourse.numenta.org/t/installation-issues-on-mac-os-high-sierra/3451/10 "2018-02-12T02:50:44Z")

</div>

I’d still give **gcc** a try.
