If you’ve installed in the past with sudo, you should run the above commands with sudo. If you installed in the past with the --user flag, you should run the above commands with the --user flag. (If you’re not sure, it is safe to run all permutations of the commands above just to make sure.
Now that no NuPIC artifacts are left on your system, simply run:
I ran and re-ran the pip uninstall and got this error on both uninstall and install:
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 299, in run
requirement_set.prepare_files(finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 458, in _prepare_file
req_to_install, finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 397, in _check_skip_installed
req_to_install.check_if_exists()
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1004, in check_if_exists
self.req.name
File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 535, in get_distribution
dist = get_provider(dist)
File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 415, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 943, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Python/2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 834, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (pytest 2.5.1 (/Users/cogmission/Library/Python/2.7/lib/python/site-packages), Requirement.parse('pytest==2.4.2'), set(['nupic']))
Either way, try uninstalling pytest by running pip uninstall pytest. Again, same thing about sudo and the --user flag (when installing python packages via pip, I almost always use the --user flag to install to a local location).
After the first un install succeeded, I still ran all the permutations of --user and sudo you suggested and I got that on all the uninstalls after the first succeeded…
Oh sorry, you don’t need the --user flag when uninstalling, apparently. But you might need to sudo pip uninstall pytest because it is a command line tool as well as a library.
When you think you have pytest uninstalled, you can test it by running:
> python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytest
This should raise an exception, and that proves it is no longer installed. Then try running pip install nupic --user again.
Running pip install nupic will automatically install nupic.bindings from Pypi if there is a binary installation file available for your platform (there is one for Yosemite).
Oh dang. No, I did not know that. I thought you just needed to run NuPIC for comparison, but you’ll actually be changing code then? But not C++ code, right?