question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError in Python 3.6 OSX 10.12

See original GitHub issue

I use Python 3.6 installed via Homebrew. There seems to be import issue, I am exactly not sure why as I see tests for Python 3.6 seems to be passing.

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

Version: locustio ==0.7.5

$ which locust
/usr/local/bin/locust

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cgoldbergcommented, Jul 21, 2017

@chhantyal

I use Python 3.6

The issue you are having is because version 0.7.5 is only compatible with Python 2.7. To get Python 3 support you must install Locust 0.8. As of today (7/21/2017) it has not been officially released… so you have 2 options:

  1. install the 0.8a2 pre-release from PyPI: pip install locustio==0.8a2
  2. install the latest master branch from the git repository: pip install git+https://github.com/locustio/locust.git

I see tests for Python 3.6 seems to be passing

Python 3.6 tests do pass in current master branch, but you’ll notice the v0.7.5 branch does not test against against Python 3.x: https://travis-ci.org/locustio/locust/builds/135922735

hth

0reactions
heymancommented, May 12, 2020

@gkandale

The stacktrace seems to indicate that the error originates from your test scripts, and not from Locust.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named ' ' in Python on Windows, Linux, and macOS
This video will show you how to fix ModuleNotFoundError : No module named ' ' when using importing packages or modules in Python....
Read more >
How to Install openbabel for Python 3.6 on macOS Sierra ...
1 Answer 1 · Extract it and cd into it (openbabel-master) · Make a directory “build” and cd into it. · RUN the...
Read more >
python curses missing module - Apple Support Communities
I can't import the python curses module. curse.textpad is missing ... Default OS X Python : 2.7.10; Python 2.7.13; Python 3.6.1.
Read more >
ModuleNotFoundError: No module named 'check' - Help [0.1]
I'm using a laptop running OS X 10.12 with Python 2.7, Python 3.6, Anaconda 4.4.0 and Spark 2.0.2 installed. EDIT: The issue is...
Read more >
Have importlib.reload() raise ModuleNotFoundError when a ...
I'm running Python3.0.6.1 (installed from brew) on OSX 10.12.3 ... against because 3.0.6.1 isn't an actual release of Python and 3.6.1 isn't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found