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.

No module named 'pkg_resources' in json_schema - new osx install

See original GitHub issue
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: OSX 10.14.2

  • Poetry version: 0.12.11

  • pyproject.toml created by init, no packages added

Issue

  1. OS-X with macports & py2.7/3.6/3.7 installed (plus the various pips)
  2. Installed poetry as recommended (using /opt/local/bin/python3.6 as the interpreter)
  3. Added poetry to path
  4. Nearly all commands crash the same way
$ poetry version -vvv
$ poetry debug:info -vvv
$ poetry add requests -vvv

All generate the same output:
------

[ModuleNotFoundError]
No module named 'pkg_resources'

Exception trace:
 /Users/andrew/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /Users/andrew/.poetry/lib/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /Users/andrew/.poetry/lib/poetry/_vendor/py3.6/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /Users/andrew/.poetry/lib/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /Users/andrew/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/base_command.py in run() at line 136
   self.initialize(input_, output_)
 /Users/andrew/.poetry/lib/poetry/console/commands/env_command.py in initialize() at line 18
   current_env = Env.get(self.poetry.file.parent)
 /Users/andrew/.poetry/lib/poetry/console/commands/command.py in poetry() at line 62
   return self.get_application().poetry
 /Users/andrew/.poetry/lib/poetry/console/application.py in poetry() at line 55
   from poetry.poetry import Poetry
 /Users/andrew/.poetry/lib/poetry/poetry.py in <module>() at line 11
   from .json import validate_object
 /Users/andrew/.poetry/lib/poetry/json/__init__.py in <module>() at line 4
   import jsonschema
 /Users/andrew/.poetry/lib/poetry/_vendor/py3.6/jsonschema/__init__.py in <module>() at line 32
   from pkg_resources import get_distribution

debug:info

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

6reactions
awbackercommented, Jan 30, 2019

Installed pip & setuptools on my p3.7 interpreter, and it works now.

Is this an issue with poetry’s installer? Is it by design?

It does rely on my local python for at least one system package (setuptools), which is 👎 . I would think that one could be vendor’d as well.

get-poetry.py:

This ensure that poetry will look for its dependencies inside the _vendor directory without tampering with the base system.

Consider my system tampered 🤣 Not a huge deal, for one person, but for the whole team and their varying configs… not sure yet.

I had no pip installed for py3.6 and py3.7 because I shouldn’t and don’t need them. Having them is confusing 😦

I’ll try a project, and give poetry to a coworker, but if he runs into any issues i"ll just call it off. So much promise… really, if poetry can fully vendor everything and run on its own internal python rather than #!/usr/bin/env python it would be great!

0reactions
stale[bot]commented, Nov 20, 2019

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'pkg_resources' in json_schema - new osx ...
Issue. OS-X with macports & py2.7/3.6/3.7 installed (plus the various pips); Installed poetry as recommended (using ...
Read more >
No module named pkg_resources - python - Stack Overflow
This error message is caused by a missing/broken Python setuptools package. Per Matt M.'s comment and setuptools issue #581, the bootstrap script referred...
Read more >
ReleaseEngineering/BuildAPI/Setup Local Virtualenv for ...
pip install -r requirements.txt. Note: If you run across the error "ImportError: No module named pkg_resources", then type this to fix it:
Read more >
Resolve "ImportError: No module named" in AWS Glue
When I try to import extra modules or packages using the AWS Glue Python shell, I get an "ImportError: No module named" response....
Read more >
Anaconda/Conda on OS X 11 -- Broken Jupyter Not...anycodings
Questions : AnacondaConda on OS X 11 -- Broken Jupyter Notebook with DEFAULT installation. % jupyter notebook Traceback (most recent call last): File ......
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