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.

Bug: Repeated `python3 setup.py install` leads to errors at startup, service loading

See original GitHub issue

Steps to reproduce

When running

pip install -e .  && python3 setup.py install 

for the first time the python folder python3.10/site-packages/ contains image and python3.10/site-packages/cryptoadvance/specterext/ contains image

However running

pip install -e .  && python3 setup.py install 

again , now

  • python3.10/site-packages/cryptoadvance/specterext/ contains image which then raises the exception at specter start;
cryptoadvance.specter.specter_error.SpecterError: 
                Module cryptoadvance.specterext.liquidissuer.service  could not be found. This could have these reasons:
  • python3.10/site-packages/ remains contains the same folders.

Cause

Running pip install -e . for the 2. time completely deletes the python3.10/site-packages/cryptoadvance folder (without noticing that it deleted the folders of some of the required packages).

Workaround

Currently I have to do pip uninstall of all services in python3.10/site-packages/cryptoadvance/specterext/ and rerun pip install -e . && python3 setup.py install .

Solutions?

  • The services specterext-exfund, specterext-faucet, cryptoadvance-liquidissuer should NOT be located in cryptoadvance/specterext/

@k9ert: What do you think?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
k9ertcommented, Oct 26, 2022

Not sure why i couldn’t reproduce in the first place but now i can 😐

0reactions
relativisticelectroncommented, Dec 3, 2022

My current understanding: pip3 install -e . (or pip3 install . ) installs

  • cryptoadvance.specter
  • and dependencies like cryptoadvance-liquidissuer

python3 setup.py install then overwrites cryptoadvance.specter.

Calling pip3 install -e . again then notices that cryptoadvance.specter was modified, and then just deletes the whole folder, while not reinstalling the dependencies.

This leads to the following steps that seems to work:

  1. pip install --require-hashes -r requirements.txt
  2. python3 setup.py install

These 2 steps can be repeated without problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`pip install` Gives Error on Some Packages - Stack Overflow
The real error in your case is: ImportError: cannot import name 'msvccompiler' from 'distutils'. It occured because setuptools has broken ...
Read more >
How to Fix Python `No such file or directory` Compiler Errors ...
Introduction. A common error that you may receive when installing Python modules is the No such file or directory error.
Read more >
Using Python's pip to Manage Your Projects' Dependencies
What is pip? In this beginner-friendly tutorial, you'll learn how to use pip, the standard package manager for Python, so that you can ......
Read more >
Installing Python Modules (Legacy version) — Python 3.11.1 ...
How installation works. After the build command runs (whether you run it explicitly, or the install command does it for you), the work...
Read more >
Configure Linux Python apps - Azure App Service
Learn how to configure the Python container in which web apps are run, using both the Azure portal and the Azure CLI.
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