Locust: ImportError: No module named 'core'

Created on 31 Jul 2015  ·  25Comments  ·  Source: locustio/locust

>> locust --help

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/bin/locust", line 9, in <module>
    load_entry_point('locustio==0.7.3', 'console_scripts', 'locust')()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/locustio-0.7.3-py3.4.egg/locust/__init__.py", line 1, in <module>
    from core import HttpLocust, Locust, TaskSet, task
ImportError: No module named 'core'

ideas ?

Most helpful comment

0.8 should be released soon. Until then pip install locustio==0.8a2 should work.

All 25 comments

Looks like you are using python 3.4. Locust does not support python3.x yet.

You should use python2.7.

Oh i see, any ETA on py3 support ? Anyone is working on it already ?

No ETA defined yet, get more info on #279

Happened to me as well. Was fixed after I re-entered the shell.

README.md says Locust works on Python 3.4 yet I still get this error on 0.7.5. Any chance for a new release?

As above -- Python 3.4 and on Locust 0.7.5

Same issue occurs on Python 3.5 in the virtual environment.

Still Getting the same error as @richardasaurus mentioned in the previous comment, when I use Locust with python 3.4.

I installed locust by running pip install locustio command

@richardasaurus How to install master branch?

@richardasaurus I am not able to find requirements.txt in python34 folder in C drive..
where can I find it?

I tried to install with pip install git+git://github.com/locustio/locust.git@master#egg=locustio but I am still getting the same error

Great! It's working now after deleting the locust folder already created and ran pip install git+git://github.com/locustio/locust.git@master#egg=locustio

Thanks

Just discovered Locust, looking forward to using it, however this Issue is still relevant - can we get a new PyPi release please? :)

Thanks and merry _insert holiday name_!

Same error happened with Python 3.5.2 (virtualenv) and locust 0.7.5.

Suggestion given by @PrithiviRajG worked for me.
I ran this first
pip uninstall locustio
then ran this
pip install git+git://github.com/locustio/locust.git@master#egg=locustio
In the end, in order to check if it is compiling and working
locust -f locustfile.py

0.8 should be released soon. Until then pip install locustio==0.8a2 should work.

pip install locustio==0.8a2 worked for me.

pip install locustio==0.8a2 worked for me too.

pip install locustio==0.8a2 worked for me too

Confirmed pip install locustio ==0.8a2 worked for me too.

redundant "me too" comments on closed issues aren't very useful.

@heyman In Feb you said "0.8 should be released soon" - but pip still installs 0.7.5 by default and it is now July. Please can you clarify what you mean by "soon"

@baynes: I'd also like to get the new release out, and hopefully we can get it uploaded to PyPI sooner than later. However, "soon" is subjective, and may not necessarily point to a particular point in time ¯\_(ツ)_/¯

In the meantime, you can pip install directly from git.

pip install locustio==0.8a2 worked for me too.

Has this issue been addressed? I am running a virtual env with Python 3.6 and

locustio==0.7.5
pyzmq==16.0.2
(locust_py_3)$ python
Python 3.6.2 (default, Jul 17 2017, 16:44:45)

when I attempt to run a script the following error occurs:

(locust_py_3) $ locust -f testmctest.py
Traceback (most recent call last):
  File "/Users/python_code/locust_py_3/bin/locust", line 7, in <module>
    from locust.main import main
  File "/Users/python_code/locust_py_3/lib/python3.6/site-packages/locust/__init__.py", line 1, in <module>
    from core import HttpLocust, Locust, TaskSet, task
ModuleNotFoundError: No module named 'core'

@Naughtron have you read through any of the thread where about 10 people posted the same solution as resolving the problem?

good,i found it.thank you

Was this page helpful?
0 / 5 - 0 ratings