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.

Can't install PyYAML with pip if setuptools isn't installed

See original GitHub issue

Trying to install PyYAML using pip when setuptools isn’t installed results in this:

# python3 -mpip install --user pyyaml
Collecting pyyaml
  Using cached PyYAML-5.3.1.tar.gz (269 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4gsyi4k8/pyyaml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4gsyi4k8/pyyaml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-p9iajmh9
         cwd: /tmp/pip-install-4gsyi4k8/pyyaml/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Ideally, PyYAML should include a pyproject.toml file declaring build-time dependencies, so that pip can fetch them automatically.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
IRDonchcommented, Dec 2, 2020

I suppose a pyproject.toml file could be added, but why not just install setuptools?

You could say that about any dependency. 🤷 Ideally, every project should fetch all of its own dependencies automatically.

1reaction
nitzmahonecommented, Dec 2, 2020

The 5.4 release will include some packaging updates that start to clean up the distutils/setuptools mess, but due to the age of the Pythons/pips we still support, we can’t wholesale switch to a PEP517 (pyproject.toml) build yet. Maybe in 6.0, depending on what Pythons we drop support for, but that’s still TBD.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip doesn't work, says it cannot build wheels - Stack Overflow
I have a new computer which is the first desktop I own and I need to install python and pip and all these...
Read more >
no module named 'pyyaml' - You.com | The AI Search Engine ...
Just run: pip3 list command and see whether you are able to see the package in the list. If not, you are not...
Read more >
Troubleshooting — immuneML 2.2.2 documentation
Try installing yaml manually with a specific version. I get an error when installing PyTorch (could not find a version that satisfies the...
Read more >
Installing — Python YAML package documentation
Make sure you have a recent version of pip and setuptools installed. ... (which are not valid YAML with the default jinja2 markers),...
Read more >
Installing With Pip — GalSim 2.4.6 documentation
But if you install with python setup.py install , then these will not be installed. Starlink (3.10.0) (Improved WCS functionality). PyYaml (3.12) (Reads ......
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