[I try to install tensorflow via virtualenv in mac, the reference is here:](https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html#virtualenv-installation)

* for I have python already, so I install virtualenv by:
`sudo pip install --upgrade virtualenv`
* build a new virtualenv environment in `~/development project/tensorflow`, not in `~/tensorflow` as is said in the reference: 

`virtualenv --system-site-packages ~/development project/tensorflow`

`cd ~/development project/tensorflow`
* active virtualenv by:

`source bin/activate # if use bash,and I choose this line to run`
* when I am in virtualenv and run this: 

`(tensorflow)$ pip install --upgrade <$url_to_binary.whl>`

it comes out an error:

`zsh: parse error near '\n'`
* [then I check here to help solve it](https://stackoverflow.com/questions/33673583/installing-tensorflow-in-a-virtualenv-on-osx)
it says that `<$url_to_binary.whl>` should be replaced by `https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl`, and I do so. And problem gone.
* but, when I try to test tensorflow by cd some dir in tensorflow like: 

`(tensorflow)$ cd tensorflow/models/image/mnist`

the dir is not exist.

so I guess the url I modified cause it, and I try to reinstall virtualenv and tensorflow, to make my install clean.
* tensorflow is successfully uninstalled, but when I remove virtualenv, it booms:

> 
> Exception: Traceback (most recent call last): File
>  "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215,
>  in main
>  status = self.run(options, args) File "/usr/local/lib/python2.7/site-packages/pip/commands/uninstall.py",
>  line 76, in run
>  requirement\_set.uninstall(auto\_confirm=options.yes) File "/usr/local/lib/python2.7/site-packages/pip/req/req\_set.py", line 346,
>  in uninstall
>  req.uninstall(auto\_confirm=auto\_confirm) File "/usr/local/lib/python2.7/site-packages/pip/req/req\_install.py", line
>  754, in uninstall
>  paths\_to\_remove.remove(auto\_confirm) File "/usr/local/lib/python2.7/site-packages/pip/req/req\_uninstall.py",
>  line 115, in remove
>  renames(path, new\_path) File "/usr/local/lib/python2.7/site-packages/pip/utils/**init**.py", line
>  267, in renames
>  shutil.move(old, new) File "/usr/local/Cellar/python/2.7.12\_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
>  line 303, in move
>  os.unlink(src) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/virtualenv-15.1.0.dist-info/DESCRIPTION.rst'
> 
> 
> 

* I delete dir `tensorflow`
* for now I could not uninstall virtualenv neither install it, but it still exist....that's really wired.
* If I run `sudo pip install --upgrade virtualenv` again, it says:

> 
> The directory '/Users/Calvino/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/Calvino/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 up-to-date:
>  virtualenv in /usr/local/lib/python2.7/site-packages
> 
> 
> 

My question is that how could I remove virtualenv and tensorflow thoroughly and reinstall them.

I would be very appreciate if anyone could help.