0

I'm following the instructions on https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-prep#prep_python_local_virtenv on macOS 10.15.4 The creation of the virtualenv results in a different outcome than expected:

%  virtualenv virtualenv
created virtual environment CPython2.7.16.final.0-64 in 761ms
  creator CPython2macOsFramework(dest=/Users/jps/.Trash/jokes/virtualenv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Users/jps/Library/Application Support/virtualenv/seed-app-data/v1.0.1)
  activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator

It looks as if Python 2.7 vs. 3.7 is being used.

jpsstack
  • 1,221
  • 4
  • 18
  • 29

1 Answers1

1

Set Python 3 as default as described in https://opensource.com/article/19/5/python-3-default-mac

Remove virtualenv

% rm -rf /Users/jps/Library/Python/2.7/bin/virtualenv

Re-install virtualenv:

% pip install virtualenv

Delete and re-create the virtualenv directory created above (has in this case the same name as the command, see question)

jpsstack
  • 1,221
  • 4
  • 18
  • 29