0

Im trying to install pytest on my MAC with Big Sur OS. I currently have both python 2.7 and python 3.9, but python 2.7 is a default installation. When I run the command:

% pip install -U pytest 

Getting an error:

OSError: [Errno 1] Operation not permitted: '/tmp/pip-lQw0PM-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pyparsing-2.0.1-py2.7.egg-info' 

How should I fix it, please?

Thank you

0

1 Answer 1

2

May be you should trying creating virtualenv and try installing pytest in it.

or

This may be an pip conflict between python 2.7 & 3.9, so you can run

 python3.9 -m pip install pytest 
Sign up to request clarification or add additional context in comments.

1 Comment

Worked perfectly fine. Thank you! I tried first % python3.9.5 -m pip install pytest But it responded zsh: command not found: python3.9.5 So I used ~ % python3.9 -m pip install pytest And got Successfully installed attrs-21.2.0 iniconfig-1.1.1 packaging-20.9 pluggy-0.13.1 py-1.10.0 pyparsing-2.4.7 pytest-6.2.4 toml-0.10.2

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.