pip install --editable . fails

395 views
Skip to first unread message

Terrence-Monroe: Brannon

unread,
Jan 2, 2022, 11:40:37 AM1/2/22
to leo-editor
Attempting to install via git, the first 2 commands work fine:
  1. git clone --depth=500 --no-single-branch https://github.com/leo-editor/leo-editor
  2. git checkout devel
However the next command errors out:

C:\programming\leo-editor>pip install --editable .
Obtaining file:///C:/programming/leo-editor
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyshortcuts>=1.7
  Downloading pyshortcuts-1.8.0.tar.gz (933 kB)
     |████████████████████████████████| 933 kB 3.3 MB/s
  Preparing metadata (setup.py) ... done
Collecting sphinx
  Downloading Sphinx-4.3.2-py3-none-any.whl (3.1 MB)
     |████████████████████████████████| 3.1 MB ...
Collecting windows-curses
  Downloading windows_curses-2.3.0-cp39-cp39-win_amd64.whl (88 kB)
     |████████████████████████████████| 88 kB 502 kB/s
Collecting build>=0.6.0
  Using cached build-0.7.0-py3-none-any.whl (16 kB)
Collecting nbformat
  Downloading nbformat-5.1.3-py3-none-any.whl (178 kB)
     |████████████████████████████████| 178 kB 6.4 MB/s
Collecting PyQt5>=5.12
  Downloading PyQt5-5.15.6-cp36-abi3-win_amd64.whl (6.7 MB)
     |████████████████████████████████| 6.7 MB 6.4 MB/s
Collecting flexx
  Downloading flexx-0.8.3-py2.py3-none-any.whl (349 kB)
     |████████████████████████████████| 349 kB ...
Collecting meta
  Using cached meta-1.0.2.tar.gz (49 kB)
  Preparing metadata (setup.py) ... done
Collecting PyQtWebEngine
  Downloading PyQtWebEngine-5.15.5-cp36-abi3-win_amd64.whl (181 kB)
     |████████████████████████████████| 181 kB 6.4 MB/s
Collecting asttokens
  Downloading asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Collecting pylint
  Downloading pylint-2.12.2-py3-none-any.whl (414 kB)
     |████████████████████████████████| 414 kB 3.3 MB/s
Collecting black
  Downloading black-21.12b0-py3-none-any.whl (156 kB)
     |████████████████████████████████| 156 kB ...
Collecting pyflakes
  Downloading pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
     |████████████████████████████████| 69 kB 530 kB/s
Collecting docutils
  Using cached docutils-0.18.1-py2.py3-none-any.whl (570 kB)
Collecting pep517>=0.9.1
  Using cached pep517-0.12.0-py2.py3-none-any.whl (19 kB)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.0-py3-none-any.whl (12 kB)
Requirement already satisfied: packaging>=19.0 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from build>=0.6.0->leo==6.6b1) (21.3)
Requirement already satisfied: colorama in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from build>=0.6.0->leo==6.6b1) (0.4.4)
Collecting PyQt5-Qt5>=5.15.2
  Downloading PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB)
     |████████████████████████████████| 50.1 MB 11 kB/s
Collecting PyQt5-sip<13,>=12.8
  Downloading PyQt5_sip-12.9.0-cp39-cp39-win_amd64.whl (63 kB)
     |████████████████████████████████| 63 kB 70 kB/s
Collecting pywin32
  Downloading pywin32-303-cp39-cp39-win_amd64.whl (9.3 MB)
     |████████████████████████████████| 9.3 MB ...
Requirement already satisfied: six in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from asttokens->leo==6.6b1) (1.16.0)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting tomli>=1.0.0
  Downloading tomli-1.2.3-py3-none-any.whl (12 kB)
Collecting pathspec<1,>=0.9.0
  Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting platformdirs>=2
  Downloading platformdirs-2.4.1-py3-none-any.whl (14 kB)
Collecting click>=7.1.2
  Downloading click-8.0.3-py3-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 847 kB/s
Requirement already satisfied: typing-extensions>=3.10.0.0 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from black->leo==6.6b1) (4.0.1)
Requirement already satisfied: tornado in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from flexx->leo==6.6b1) (6.1)
Collecting webruntime>=0.5.6
  Downloading webruntime-0.5.8-py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 190 kB/s
Collecting dialite>=0.5.2
  Downloading dialite-0.5.3-py3-none-any.whl (8.8 kB)
Collecting pscript>=0.7.3
  Downloading pscript-0.7.6-py3-none-any.whl (126 kB)
     |████████████████████████████████| 126 kB 2.2 MB/s
Collecting ipython-genutils
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting jsonschema!=2.5.0,>=2.4
  Downloading jsonschema-4.3.3-py3-none-any.whl (71 kB)
     |████████████████████████████████| 71 kB 20 kB/s
Collecting jupyter-core
  Downloading jupyter_core-4.9.1-py3-none-any.whl (86 kB)
     |████████████████████████████████| 86 kB 916 kB/s
Collecting traitlets>=4.1
  Downloading traitlets-5.1.1-py3-none-any.whl (102 kB)
     |████████████████████████████████| 102 kB 896 kB/s
Collecting isort<6,>=4.2.5
  Downloading isort-5.10.1-py3-none-any.whl (103 kB)
     |████████████████████████████████| 103 kB ...
Collecting mccabe<0.7,>=0.6
  Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting astroid<2.10,>=2.9.0
  Downloading astroid-2.9.1-py3-none-any.whl (254 kB)
     |████████████████████████████████| 254 kB ...
Collecting toml>=0.9.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting PyQtWebEngine-Qt5>=5.15.2
  Downloading PyQtWebEngine_Qt5-5.15.2-py3-none-win_amd64.whl (60.0 MB)
     |████████████████████████████████| 60.0 MB 30 kB/s
Collecting sphinxcontrib-serializinghtml>=1.1.5
  Downloading sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
     |████████████████████████████████| 94 kB 74 kB/s
Collecting sphinxcontrib-htmlhelp>=2.0.0
  Downloading sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
     |████████████████████████████████| 100 kB 268 kB/s
Collecting alabaster<0.8,>=0.7
  Downloading alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting Pygments>=2.0
  Using cached Pygments-2.11.1-py3-none-any.whl (1.1 MB)
Collecting sphinxcontrib-jsmath
  Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting imagesize
  Downloading imagesize-1.3.0-py2.py3-none-any.whl (5.2 kB)
Collecting docutils
  Downloading docutils-0.17.1-py2.py3-none-any.whl (575 kB)
     |████████████████████████████████| 575 kB ...
Collecting snowballstemmer>=1.1
  Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
     |████████████████████████████████| 93 kB 106 kB/s
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages (from sphinx->leo==6.6b1) (58.1.0)
Collecting sphinxcontrib-devhelp
  Downloading sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
     |████████████████████████████████| 84 kB 122 kB/s
Requirement already satisfied: requests>=2.5.0 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from sphinx->leo==6.6b1) (2.26.0)
Collecting sphinxcontrib-qthelp
  Downloading sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 295 kB/s
Requirement already satisfied: Jinja2>=2.3 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from sphinx->leo==6.6b1) (3.0.3)
Collecting sphinxcontrib-applehelp
  Downloading sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
     |████████████████████████████████| 121 kB 3.3 MB/s
Collecting babel>=1.3
  Downloading Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
     |████████████████████████████████| 8.8 MB 6.8 MB/s
Collecting wrapt<1.14,>=1.11
  Downloading wrapt-1.13.3-cp39-cp39-win_amd64.whl (34 kB)
Collecting lazy-object-proxy>=1.4.0
  Downloading lazy_object_proxy-1.7.1-cp39-cp39-win_amd64.whl (22 kB)
Requirement already satisfied: pytz>=2015.7 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from babel>=1.3->sphinx->leo==6.6b1) (2021.3)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Jinja2>=2.3->sphinx->leo==6.6b1) (2.0.1)
Collecting attrs>=17.4.0
  Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)
     |████████████████████████████████| 60 kB 604 kB/s
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Using cached pyrsistent-0.18.0-cp39-cp39-win_amd64.whl (62 kB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from packaging>=19.0->build>=0.6.0->leo==6.6b1) (3.0.6)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests>=2.5.0->sphinx->leo==6.6b1) (2.0.9)
Requirement already satisfied: idna<4,>=2.5 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests>=2.5.0->sphinx->leo==6.6b1) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests>=2.5.0->sphinx->leo==6.6b1) (1.26.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\thequ\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests>=2.5.0->sphinx->leo==6.6b1) (2021.10.8)
Using legacy 'setup.py install' for pyshortcuts, since package 'wheel' is not installed.
Using legacy 'setup.py install' for meta, since package 'wheel' is not installed.
Installing collected packages: wrapt, traitlets, tomli, pywin32, pyrsistent, PyQt5-sip, PyQt5-Qt5, lazy-object-proxy, dialite, attrs, webruntime, toml, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, snowballstemmer, PyQtWebEngine-Qt5, PyQt5, Pygments, pscript, platformdirs, pep517, pathspec, mypy-extensions, mccabe, jupyter-core, jsonschema, isort, ipython-genutils, imagesize, docutils, click, babel, astroid, alabaster, windows-curses, sphinx, pyshortcuts, PyQtWebEngine, pylint, pyflakes, nbformat, meta, flexx, build, black, asttokens, leo
  WARNING: The script webruntime.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pylupdate5.exe, pyrcc5.exe and pyuic5.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pygmentize.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts jupyter-migrate.exe, jupyter-troubleshoot.exe and jupyter.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script jsonschema.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts isort-identify-imports.exe and isort.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pybabel.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts sphinx-apidoc.exe, sphinx-autogen.exe, sphinx-build.exe and sphinx-quickstart.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Running setup.py install for pyshortcuts ... done
  WARNING: The scripts epylint.exe, pylint.exe, pyreverse.exe and symilar.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyflakes.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script jupyter-trust.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Running setup.py install for meta ... done
  WARNING: The script flexx.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyproject-build.exe is installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts black-primer.exe, black.exe and blackd.exe are installed in 'C:\Users\thequ\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py develop for leo
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\thequ\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\programming\\leo-editor\\setup.py'"'"'; __file__='"'"'C:\\programming\\leo-editor\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: C:\programming\leo-editor\
    Complete output (32 lines):
    running develop
    C:\Users\thequ\AppData\Local\Temp\pip-build-env-zivg4cfq\overlay\Lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    WARNING: The user site-packages directory is disabled.
    C:\Users\thequ\AppData\Local\Temp\pip-build-env-zivg4cfq\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-5508.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\Lib\site-packages\

    Perhaps your account does not have write access to this directory?  If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account.  If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.

    For information on other options, you may wish to consult the
    documentation at:

      https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

    Please make the appropriate changes for your system and try again.

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\thequ\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\programming\\leo-editor\\setup.py'"'"'; __file__='"'"'C:\\programming\\leo-editor\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

tbp1...@gmail.com

unread,
Jan 2, 2022, 11:58:31 AM1/2/22
to leo-editor
It looks like the main problem was that the install needed to be done with admin privileges, since it wanted to use c:\Program Files.

Personally, I have never installed this way from a git clone.  Instead, I set PYTHONPATH to point to the top of the clone's directory.  This can be done by hand, or better by a batch file.  Here's the batch file that I use (py is an alias for python on my system):

@echo off
set OLDPATH=%PYTHONPATH%
set PYTHONPATH=%PYTHONPATH%;c:\Tom\git\leo-editor
py -m leo.core.runLeo %*
set PYTHONPATH=%OLDPATH%

You could also use setlocal...endlocal instead of saving and restoring the previous PYTHONPATH.

When you set PYTHONPATH, python looks for files first in the PYTHONPATH directory path before looking in the standard locations.  This is exactly what you want here.
Reply all
Reply to author
Forward
0 new messages