2

Context: Am working on the flaskr web project on Mac OS High Sierra.

Am at stage of installing Flask and I am running into issues with installing virtualenv: http://flask.pocoo.org/docs/0.12/tutorial/packaging/

When running the following line in Terminal:

pip install virtualenv

I get:

pip install virtualenv
Collecting virtualenv
Using cached virtualenv-15.2.0-py2.py3-none-any.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 
1.8.0rc1 which is incompatible.
Installing collected packages: virtualenv

I was expecting a response 'successfully installed virtualenv...' as appears in this video: https://youtu.be/-COGZITgHtw?t=1m9s.

Then, when running the following in Terminal:

virtualenv 

I get:

-bash: virtualenv: command not found 

I note others have had issues with ‘command not found’ (bash: pip: command not found, How to add virtualenv to path) but I cannot seem to find outputs which mirror what I have received.

Is the cached virtualenv holding things up? Or perhaps the matplotlib stuff? Either way, virtualenv doesn't appear to have installed as it ought.

Would it be wise (in any case) to update or install nose, tornado and numpy using pip so that I can progress to activating a virtualenv? Or is something I need to address first before I can get virtuanlenv to start working?

Joshua Wolff
  • 2,687
  • 1
  • 25
  • 42
DavidGodwin
  • 361
  • 1
  • 3
  • 5
  • Can you share more information? Which python version are you using? If python3, then check https://docs.python.org/3/library/venv.html – FrEaKmAn Apr 02 '18 at 16:21
  • All Python projects have been in Python 2. In Terminal: `python` outputs: `Python 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information.` Then `which python` outputs: `/usr/bin/python` Then: `which python3` outputs: `/Library/Frameworks/Python.framework/Versions/3.6/bin/python3` – DavidGodwin Apr 02 '18 at 17:44
  • Are you sure you don't get any error when installing virtualenv? – FrEaKmAn Apr 02 '18 at 19:32
  • No error I'm afraid. Here's what I get: `$ pip install virtualenv` outs `Collecting virtualenv Using cached virtualenv-15.2.0-py2.py3-none-any.whl matplotlib 1.3.1 requires nose, which is not installed. matplotlib 1.3.1 requires tornado, which is not installed. matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible. Installing collected packages: virtualenv` And that's it so far. Is there a better way to install virtualenv? – DavidGodwin Apr 02 '18 at 20:24
  • 1
    Maybe this can help? https://stackoverflow.com/questions/31133050/virtualenv-command-not-found – FrEaKmAn Apr 02 '18 at 20:31
  • 1
    Looks to have worked and circumvented the cached response. Now sitting in `/usr/local/bin/virtualenv` Many thanks – DavidGodwin Apr 03 '18 at 20:35

1 Answers1

1

I did the same error, but succeeded with the following procedure.


$ brew install python3

$ pip3 install --upgrade virtualenv

Collecting virtualenv

Cache entry deserialization failed, entry ignored

Cache entry deserialization failed, entry ignored

Downloading virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)

100% |████████████████████████████████| 2.6MB 226kB/s 

Installing collected packages: virtualenv

Successfully installed virtualenv-15.2.0