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.

Poetry unable to install any package

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).
  • Ubuntu 20.04.2 LTS:
  • 1.1.6:
  • New Project:

Issue

I’m able to install poetry via the recommended way, however I’m unable to install any package. The only error I get is: Failed to add packages, reverting the pyproject.toml file to its original content.

franz@vm:~$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

$HOME/.poetry/bin

This path will then be added to your `PATH` environment variable by
modifying the profile file located at:

$HOME/.profile

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing version: 1.1.6
  - Downloading poetry-1.1.6-linux.tar.gz (72.00MB)

Poetry (1.1.6) is installed now. Great!

To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run `source $HOME/.poetry/env`

franz@vm:~$ source $HOME/.poetry/env

franz@vm:~/testproject$ poetry -V
Poetry version 1.1.6

franz@vm:~$ poetry new testing
Created package testing in testing
franz@vm:~$ cd testing/
franz@vm:~/testing$ poetry add numpy
Creating virtualenv testing-QFsV7GYT-py3.8 in /home/franz/.cache/pypoetry/virtualenvs
Using version ^1.20.2 for numpy

Updating dependencies
Resolving dependencies... (19.4s)

Writing lock file

Package operations: 9 installs, 0 updates, 0 removals

Failed to add packages, reverting the pyproject.toml file to its original content.

franz@vm:~/testing$ poetry add numpy -vvv
Using virtualenv: /home/franz/.cache/pypoetry/virtualenvs/testing-QFsV7GYT-py3.8
PyPI: No release information found for numpy-0.9.6, skipping
PyPI: No release information found for numpy-0.9.8, skipping
PyPI: No release information found for numpy-1.0.3, skipping
PyPI: No release information found for numpy-1.0.4, skipping
PyPI: No release information found for numpy-1.0b1, skipping
PyPI: No release information found for numpy-1.0b4, skipping
PyPI: No release information found for numpy-1.0b5, skipping
PyPI: No release information found for numpy-1.0rc1, skipping
PyPI: No release information found for numpy-1.0rc2, skipping
PyPI: No release information found for numpy-1.0rc3, skipping
PyPI: No release information found for numpy-1.1.1, skipping
PyPI: No release information found for numpy-1.2.0, skipping
PyPI: No release information found for numpy-1.2.1, skipping
PyPI: No release information found for numpy-1.4.0, skipping
PyPI: 72 packages found for numpy *
Using version ^1.20.2 for numpy

Updating dependencies
Resolving dependencies...
   1: fact: testing is 0.1.0
   1: derived: testing
   1: fact: testing depends on numpy (^1.20.2)
   1: fact: testing depends on pytest (^5.2)
   1: fact: testing depends on pytest (^5.2)
   1: selecting testing (0.1.0)
   1: derived: pytest (>=5.2,<6.0)
   1: derived: numpy (>=1.20.2,<2.0.0)
   1: fact: pytest (5.4.3) depends on py (>=1.5.0)
   1: fact: pytest (5.4.3) depends on packaging (*)
   1: fact: pytest (5.4.3) depends on attrs (>=17.4.0)
   1: fact: pytest (5.4.3) depends on more-itertools (>=4.0.0)
   1: fact: pytest (5.4.3) depends on pluggy (>=0.12,<1.0)
   1: fact: pytest (5.4.3) depends on wcwidth (*)
   1: fact: pytest (5.4.3) depends on atomicwrites (>=1.0)
   1: fact: pytest (5.4.3) depends on colorama (*)
   1: selecting pytest (5.4.3)
   1: derived: colorama
   1: derived: atomicwrites (>=1.0)
   1: derived: wcwidth
   1: derived: pluggy (>=0.12,<1.0)
   1: derived: more-itertools (>=4.0.0)
   1: derived: attrs (>=17.4.0)
   1: derived: packaging
   1: derived: py (>=1.5.0)
PyPI: No release information found for numpy-0.9.6, skipping
PyPI: No release information found for numpy-0.9.8, skipping
PyPI: No release information found for numpy-1.0.3, skipping
PyPI: No release information found for numpy-1.0.4, skipping
PyPI: No release information found for numpy-1.0b1, skipping
PyPI: No release information found for numpy-1.0b4, skipping
PyPI: No release information found for numpy-1.0b5, skipping
PyPI: No release information found for numpy-1.0rc1, skipping
PyPI: No release information found for numpy-1.0rc2, skipping
PyPI: No release information found for numpy-1.0rc3, skipping
PyPI: No release information found for numpy-1.1.1, skipping
PyPI: No release information found for numpy-1.2.0, skipping
PyPI: No release information found for numpy-1.2.1, skipping
PyPI: No release information found for numpy-1.4.0, skipping
PyPI: 1 packages found for numpy >=1.20.2,<2.0.0
   1: selecting numpy (1.20.2)
   1: selecting wcwidth (0.2.5)
   1: selecting pluggy (0.13.1)
   1: selecting more-itertools (8.7.0)
   1: selecting attrs (20.3.0)
   1: fact: packaging (20.9) depends on pyparsing (>=2.0.2)
   1: selecting packaging (20.9)
   1: derived: pyparsing (>=2.0.2)
   1: selecting py (1.10.0)
   1: selecting pyparsing (2.4.7)
   1: selecting colorama (0.4.4)
   1: selecting atomicwrites (1.4.0)
   1: Version solving took 0.047 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system

Package operations: 9 installs, 0 updates, 0 removals, 2 skipped


Failed to add packages, reverting the pyproject.toml file to its original content.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Kubodeawacommented, Feb 18, 2022

Ok, thanks… maybe some temporary files are messing up, who knows. I will wait for the next server reboot, or ask around if this can be done. For the moment I made an installation on a remote disk, self-contained (virtualenvs and cache in the same path) so only the config.toml is in my home folder. I tried to run it but got the same result, now I will ask some colleagues to try this centralized installation to see if it works for them.

0reactions
Kubodeawacommented, Feb 18, 2022

I think I managed to fix it. After a lot of trial and error I finally found that I had the LANG environment variable of my tcsh sessions set to en_US (I don’t even remember why I had this line in the .cshrc file, it was probably needed by some other program or operating system, since my home was also mounted in some old Solaris machines). Changing it to en_US.utf8 (actually, the default value for my system) did the trick for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry already added module, but not installed - Stack Overflow
After poetry install and open python, I found I could import some module(numpy and pandas), but not others like seaborn, lightgbm and etc.....
Read more >
Introduction | Documentation | Poetry - Python dependency ...
Any installs performed using get-poetry.py should be uninstalled and reinstalled using install.python-poetry.org to ensure in-place upgrades are possible.
Read more >
Dependency Management With Python Poetry
Consequently, a user installing your package might get an error because your dependency versions are incompatible with their Python version.
Read more >
Issues with pip install poetry - Q&A | Deepnote Community
Hello, I have a private Git repository that I use to sync to Deepnote. All dependencies live in a pyproject.toml file. Besides the...
Read more >
Poetry installation fails on Ubuntu - command line
You add ~/poetry/bin to PATH , but it should be ~/.poetry/bin . Regarding python is not available, you can (re)install python-is-python3 package ......
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