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.

[KED-1124] kedro install fails to update the installed kedro version

See original GitHub issue

Description

kedro install is unable to change/update/uninstall the currently installed kedro version

Context

I was trying to get started with a kedro project, and I needed kedro to be able to run kedro install, so I ran pip install kedro before doing anything else

Steps to Reproduce

  1. pip install kedro (this gave me kedro 0.15.3)
  2. Clone a git repository with a kedro project, which was intialized with kedro 0.15.1, so that kedro==0.15.1 was specified in the requirements.txt file
  3. Run kedro install in the context of that project

Expected Result

I expected the kedro install command to complete without problems.

Actual Result

I got an error like this:

  Found existing installation: kedro 0.15.1
    Uninstalling kedro-0.15.1:
      Successfully uninstalled kedro-0.15.1
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Ingen tilgang: 'C:\\Users\\Iver\\AppData\\Local\\Temp\\pip-uninstall-4ty9ouew\\kedro.exe'
Consider using the `--user` option or check the permissions.

“Ingen tilgang” translates to “Access is denied”. I think this occurs because kedro.exe is being used (by kedro install) while the pip subprocess is trying to uninstall it (kedro.exe) before replacing it with a different version.

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • Kedro version used (pip show kedro or kedro -V): See notes above
  • Python version used (python -V): 3.7.4 (64-bit) installed with conda
  • Operating system and version: Windows 10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iver56commented, Oct 18, 2019

In that case, you could implement something like this until a better solution is in place:

function kedro install:
    if os is windows and kedro version would be changed by running kedro install:
        print("This command would try to change the installed kedro version. This does not work on Windows at the moment. Please run this command instead: `pip install ...(insert proper command`")
        exit()
    else:
        # perform normal kedro install procedure

Another question to ask is: What value does kedro install add compared to just running pip install -r requirements.txt? A shorter (albeit unfamiliar and potentially confusing to new users) command? If the provided value is not worth the cost, would it be better to remove it?

0reactions
mzjp2commented, Oct 29, 2019

Nice one @DmitriiDeriabinQB! 🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

[KED-1124] kedro install fails to update the installed ... - GitHub
Description kedro install is unable to change/update/uninstall the currently installed kedro version Context I was trying to get started ...
Read more >
Install Kedro — Kedro 0.18.4 documentation
You should see the version of git available or an error message if it is not installed. You can download it from the...
Read more >
Frequently asked questions — Kedro 0.18.4 documentation
Once Kedro is installed, you can check your version as follows: kedro --version. Copy to clipboard. To later upgrade Kedro to a different...
Read more >
Install Kedro — Kedro 0.17.7 documentation
Install a development version¶. You can try out a development version of Kedro direct from the Kedro Github repository by following these steps....
Read more >
Install Kedro — Kedro 0.17.4 documentation
You should see an ASCII art graphic and the Kedro version number. ... or have any issues with your installation, see the frequently...
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