Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'six' #116

Open
efung opened this issue Apr 1, 2021 · 1 comment · May be fixed by #117
Open

ModuleNotFoundError: No module named 'six' #116

efung opened this issue Apr 1, 2021 · 1 comment · May be fixed by #117

Comments

@efung
Copy link

efung commented Apr 1, 2021

I'm trying to set up a brand new Python based project, and have a minimal dev environment right now, just Python 3.8.4 and pip.

After adding this to my requirements.txt:

git+https://github.com/Shopify/[email protected]

I did dev up, and saw the package being installed.

I then added this entry to dev.yml:

commands:
    lint:
        desc: Highlight syntactical and stylistic problems in the code via pylint
        run: "pylint --rcfile=pylintrc package tests *.py"

But when I run dev lint, I get this missing module error. Does the six module need to be declared in shopify_python's setup.py?

👩‍💻  Running pylint --rcfile=pylintrc package tests *.py from dev.yml
Traceback (most recent call last):
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/pylint/__init__.py", line 19, in run_pylint
    Run(sys.argv[1:])
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/pylint/lint.py", line 1359, in __init__
    linter.load_plugin_modules(plugins)
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/pylint/lint.py", line 519, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/astroid/modutils.py", line 210, in load_module_from_name
    return importlib.import_module(dotted_name)
  File "/Users/efung/.pyenv/versions/3.8.4/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/shopify_python/__init__.py", line 6, in <module>
    from shopify_python import google_styleguide
  File "/Users/efung/.pyenv/virtualenvs/inbox-message-classification/3.8.4/lib/python3.8/site-packages/shopify_python/google_styleguide.py", line 10, in <module>
    import six
ModuleNotFoundError: No module named 'six'
@efung
Copy link
Author

efung commented Apr 1, 2021

For context, I'm trying to document how to set up a Python project from scratch, that can be deployed on our Production Platform. Currently, there are no walkthroughs in their docs for Python.

I want to include the Shopify Python standards, but it looks just installing the current module doesn't quite work out of the box, due to this issue, as well as the issue with the pylint version

@efung efung linked a pull request Apr 6, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant