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.

`pip install`ing PyYAML crashes the Action running

See original GitHub issue

Describe the bug pip installing a version of PyYAML which is not the version being used to run the workflow causes the workflow runner to crash on subsequent steps.

2020-07-15T21:47:13.5356959Z FileNotFoundError: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/PyYAML-5.3.1-py3.7-linux-x86_64.egg'
2020-07-15T21:47:13.5916339Z ##[error]Process completed with exit code 1.

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

If applicable, please specify if you’re using a container

Python Versions 3.7.8

To Reproduce Steps to reproduce the behavior:

  1. Run a workflow e.g. this one that pip installs some version of PyYAML
  2. On my workflow, scroll down to “Install Conflicting PyYAML”
  3. Notice the FileNotFoundError which is not from execution of my workflow.
  4. Notice that the “Do Something Else” step is not run.

Run/Repo Url https://github.com/jameshiebert/action/runs/875331441?check_suite_focus=true

Additional context I guess the right (?) way to work around this is to install everything in a virtual environment (as shown in the following commit), but:

  1. There’s nothing in the README (that I can find, at least) that says this is necessary, and
  2. I’d argue that it’s a bug (or at the very least, not proper encapsulation) if the user is able to cause the workflow runner to crash.

If I’m doing something wrong, I’d be happy to hear about it 😃 Thanks.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
maxim-lobanovcommented, Jul 21, 2020

Hello everyone, this issue is related to image, not the setup-python task. We are working on investigation and fix. Progress can be tracked in https://github.com/actions/virtual-environments/issues/1202#issuecomment-660006490

1reaction
nathan-weinbergcommented, Jul 20, 2020

I was able to workaround this by changing the pyyaml version from 5.1 to 5.3.1 in my requirements.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

T215434 PyYAML fails to install in python3 venv on Stretch ...
Found while attempting to migrate a python3 tool from the Trusty job grid to the new Stretch job grid. In addition the compilation...
Read more >
pip3 install PyYAML failed.(python3.7, macOS High Sierra)
Although PyYAML's page on PyPI, indicates that only 3.4 and 3.5 are supported, 3.6 seems to be fine.
Read more >
Solved: Crash in Ubuntu 20.04 and RHEL8.2 - Cisco Community
Solved: Hello, I'm experiencing a crash both on Ubuntu 20.04 and RHEL8.2 (inside ... Once forced the pybind11 version in "pip install pybind"...
Read more >
YAML: The Missing Battery in Python
Serialize YAML Documents as JSON; Install the PyYAML Library ... a chance to take a quick crash course before diving deeper into the...
Read more >
Robot Framework User Guide
Running pip command; Installing and uninstalling Robot Framework ... the actions are described with keyword starting with When and the expectations with a ......
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