Can't find pytest

I am using Community v 3.0.2 on Linux Mint 15.

At the top of a test file, I have:
import pytest

pytest is underscored in red. When I look at the event log, it shows:
Error occurred when installing packages.

The following command was executed:

/opt/pycharm-community-3.0.2/helpers/packaging_tool.py install –build-dir /tmp/pycharm-packaging6508688797532545523.tmp pytest

The error output of the command:

Failed to perform action. Permission denied.

When I issue the above command in a terminal, it says it's not there:
sudo /opt/pycharm-community-3.0.2/helpers/packaging_tool.py install –build-dir /tmp/pycharm-packaging6508688797532545523.tmp pytest
sudo: /opt/pycharm-community-3.0.2/helpers/packaging_tool.py: command not found
But it is there:

$ l /opt/pycharm-community-3.0.2/helpers/
total 1.8M
drwxr-xr-x 3 root root 4.0K Dec  8 16:34 coverage
drwxr-xr-x 7 root root 4.0K Dec  8 16:34 docutils
drwxr-xr-x 4 root root 4.0K Dec  8 16:34 epydoc
drwxr-xr-x 4 root root 4.0K Dec  8 16:34 pycharm
drwxr-xr-x 2 root root 4.0K Dec  8 16:34 pydev
drwxr-xr-x 4 root root 4.0K Dec  8 16:34 python-skeletons
drwxr-xr-x 2 root root 4.0K Dec  8 16:34 rest_runners
drwxr-xr-x 2 root root 4.0K Dec  8 16:34 tools
  • rw-rr 1 root root 1.3K Nov 28 20:22 epydoc_formatter.py
  • rw-rr 1 root root  327 Nov 28 20:22 extra_syspath.py
  • rw-rr 1 root root 116K Nov 28 20:22 generator3.py
  • rw-rr 1 root root    8 Nov 28 20:22 icon-robots.txt
  • rw-rr 1 root root 3.8K Nov 28 20:22 packaging_tool.py
  • rw-rr 1 root root  69K Nov 28 20:22 pep8.py
  • rw-rr 1 root root 435K Nov 28 20:22 pip-1.4.1.tar.gz
  • rw-rr 1 root root 147K Nov 28 20:22 pyparsing.py
  • rw-rr 1 root root 146K Nov 28 20:22 pyparsing_py3.py
  • rw-rr 1 root root 1.1K Nov 28 20:22 required_gen_version
  • rw-rr 1 root root 5.7K Nov 28 20:22 rest_formatter.py
  • rw-rr 1 root root 2.7K Nov 28 20:22 roman.py
  • rw-rr 1 root root 1.2K Nov 28 20:22 run_coverage.py
  • rw-rr 1 root root 666K Nov 28 20:22 setuptools-1.1.5.tar.gz
  • rw-rr 1 root root  128 Nov 28 20:22 syspath.py
  • rw-rr 1 root root  16K Nov 28 20:22 test_generator.py
  • rw-rr 1 root root  96K Nov 28 20:22 virtualenv.py

What am I missing?

Thanks
1 comment
Comment actions Permalink
I don't think I've explained this well.

If I go to 'Settings|Python Integrated Tools' and select py.test as the 'Default test runner', a yellow exclamation icon appears at the left stating:

No py.test runner found in selected interpreter

When I push the Fix button on the right side of this dialog, it asks for a password to make system changes, which I enter. After closing out of this dialog, I see a message with a red background at the top right of the IDE, stating "Install packages failed." When I press on the details hyperlink for this message, it shows me the failure message in my original post.

When I issue that same command at the prompt using sudo:
sudo /opt/pycharm-community-3.0.2/helpers/packaging_tool.py install –build-dir /tmp/pycharm-packaging8655369643566895618.tmp pytest

it echoes:
sudo: /opt/pycharm-community-3.0.2/helpers/packaging_tool.py: command not found

image1

image2

image3
0

Please sign in to leave a comment.