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.

Bootstrap.py fails in version 4.x

See original GitHub issue

Problem Description

While trying to install PyLS locally, bootstrap.py is unable to create the required directory spyder-4.x/external-deps/python-language-server/.installation-dir.

What steps reproduce the problem?

I followed the instructions “To start Spyder directly from your clone”: https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md

What is the expected output? What do you see instead?

Expected: Spyder launched. Observed: Traceback.

Paste Traceback/Error Below (if applicable)


python3 bootstrap.py
Executing Spyder from source checkout
WARNING: Ubuntu Apport exception hook is detected
         Use --no-apport option to disable it
*. Patched sys.path with /home/elkins/Downloads/spyder
*. Patched sys.path with /home/elkins/Downloads/spyder/external-deps/python-language-server
*. Patched sys.path with /home/elkins/Downloads/spyder/external-deps/spyder-kernels
*. Installing PyLS locally
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 2] No such file or directory: '/home/elkins/Downloads/spyder/external-deps/python-language-server/.installation-dir/test-easy-install-216349.write-test'

Versions

  • Spyder version: 4.x from github
  • Python version: 3.8.2
  • Qt version: 5.12.8
  • PyQt version: 5.14.1
  • Operating System name/version: Xubuntu 20.04.up-to-date

Fix

Replace line 165:

print("*. Installing PyLS locally")

with

print("*. Installing PyLS locally on {}".format(pyls_installation_dir))
if not osp.exists(pyls_installation_dir):
    Path(pyls_installation_dir).mkdir(parents=True)

Insert the following after line 26:

from pathlib import Path

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
CAM-Gerlachcommented, Sep 20, 2020

@ccordoba12 @texadactyl I can give both a shot, assuming I can reliably repro it. Your fix looks fine, apart from some semantic improvements. If a later version of setuptools fixes this, it seems it lies between (45.2.0, 49.6.0] since I had an older version than you previously (42.x).

0reactions
real-yfprojectscommented, Feb 28, 2021

I had the same issue on a venv virtualenvironment. But upgrading setuptools from 44.0.0 to 53.1.0 fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1396662 – bootstrap.py --remove fails to execute with error ...
Description of problem: When running the bootstrap.py with the --remove option to delete and unsubscribe a host from satellite, I get: Traceback (most ......
Read more >
How to solve pkg_resources.VersionConflict error during bin ...
For zc.buildout versions 2.2.0 and up the bootstrap.py script has been updated to load setuptools the-not-forked-version.
Read more >
1210157 - bootstrap.py raises syntax error on Python 3
' - done 'And finally, in your terminal: cd ~/src and start the bootstrapper like this: python bootstrap.py' - failed [foo@ba ~/src ]...
Read more >
CSS · Bootstrap
Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap...
Read more >
Bootstrapping - AWS Cloud Development Kit (AWS CDK) v2
Earlier versions of the bootstrap template created an AWS KMS key in each bootstrapped environment by default. To avoid charges for the KMS...
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