mutpy icon indicating copy to clipboard operation
mutpy copied to clipboard

from mutpy import commandline ImportError: No module named mutpy

Open m3r3lin opened this issue 6 years ago • 6 comments

upgrade to last version mutpy Successfully installed Jinja2-2.10 MarkupSafe-1.0 PyYAML-3.13 mutpy-0.5.1

when use this command: mut.py --target calculator --unit-test test_calculator -m get this error:

(venv) D:\python project\lasttest>mut.py --target calculator --unit-test test_calculator -m Traceback (most recent call last): File "D:\python project\lasttest\venv\Scripts\mut.py", line 4, in from mutpy import commandline ImportError: No module named mutpyt

m3r3lin avatar Aug 30 '18 17:08 m3r3lin

Hi, thanks for reporting. I could not reproduce this problem on Linux. I need to set up a Windows environment for that. While I do that could you tell me your Python version?

phihos avatar Sep 03 '18 10:09 phihos

Was there any resolution to this issue; because I'm getting the same problem?

greykes avatar Nov 01 '19 07:11 greykes

@greykes Can you give me more information? OS, Python version MutPy version.

phihos avatar Nov 17 '19 14:11 phihos

Hi Phihos, I'm using Windows 10 64 bit. Python is python 3.8. No matter what I do I can't get it to work. I've tried setting paths and nothing. This is the error I'm getting:

C:\mutpyTest>mut.py --target calculator --unit-test test_calculator -m Traceback (most recent call last): File "C:\mutpy-master\bin\mut.py", line 4, in from mutpy import commandline File "C:\mutpy-master\bin\mutpy\commandline.py", line 5, in from mutpy import controller, views, operators, utils File "C:\mutpy-master\bin\mutpy\controller.py", line 84 for target_module, to_mutate in self.target_loader.load([module for module, *_ in test_modules]): ^ SyntaxError: invalid syntax

greykes avatar Nov 20 '19 01:11 greykes

@phihos Hi, is there any resolution to the issue I reported above. I still haven't gotten a resolution to the issue and the system still persists to today. Can you please help with this issue?

greykes avatar Jan 13 '20 15:01 greykes

Good Morning, i had the same Problem, because of using conda.

The problem is, that the mut.py starts with a different python.exe than you use to start the mut.py.

Solution: Open the file mut.py form the error message. in your case "D:\python project\lasttest\venv\Scripts\mut.py"

At the first line in this file you can find the python.exe wich is executed. In my example "c:\program files\anaconda3\python.exe"

Now open this python.exe and enter import mutpy. This should throw the same error.

Now you have 2 Solutions:

  1. Intsall here the module again
  2. Change the path to the same python.exe you are using to run the mut.py

PascalPuchtler avatar Mar 10 '20 08:03 PascalPuchtler