Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

failed to make an editable install #331

@yuuuxt

Description

@yuuuxt

🐛 Bug Report

failed to make an editable install

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. system-wide it's Anaconda 3.8. there exists poetry, but it's not used as shown below
  2. create an project using all default settings (named python-project)
  3. in the project folder, create a setup.py as follows:
from setuptools import find_packages, setup

setup(
    name="python_project",
    version='0.0.1',

    author='author',

    packages=find_packages(where='python_project'),
    package_dir={'': 'python_project'}
)
  1. in system-wide python & in project folder, run pip install -e ./
  2. getting error:
ERROR: Command errored out with exit status 1:
     command: 'C:\Users\xxx\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\path-to\\python-project\\setup.py'"'"'; __file__='"'"'C:\\path-to\\python-pro
ject\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: C:\path-to\python-project\
    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: 'C:\Users\xxx\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\path-to\\python-project\\setup.py'"'"'; __file__='"'"
'C:\\path-to\\python-project\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"
'"'))' develop --no-deps Check the logs for full command output.
  1. delete pyproject.toml as well as related .pre-commit-config.yaml and .github;
  2. run pip install -e ./ again and it succeeds.

Code sample

NA

Environment

  • OS: Win10 x64
  • Python version, get it with: Anaconda x64 3.8.8

Screenshots

NA

📈 Expected behavior

to create an editable install by just adding a setup.py file.

📎 Additional context

For my specific project, an editable install fits better as it involves pywin32.

I found a "fix" as follows:

  • comment out the build-backend = "poetry.core.masonry.api" line in pyproject.toml;
  • make an editable install with pip install -e . --no-use-pep517

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions