Tom de Geus
Tom de Geus

Reputation: 5965

(Python's) shebang too long

When installing a script using Python, the shebang gets replaced as discussed in this post.

The problem is that in my case it gets replaced by

#!/ssoft/spack/paien/v2/opt/spack/linux-rhel7-x86_E5v2_IntelIB/gcc-7.3.0/python-3.6.5-5yxsy6j5miw26wxpzrtync5gnhtsv5pt/bin/python3

which appears too long for the OS to handle:

bad interpreter: /ssoft/spack/paien/v2/opt/spack/linux-rhel7-x86_E5v2_IntelIB/g: no such file or directory

How can I work around this problem?

(Except for overriding setuptools' default script copy routine.)

Upvotes: 3

Views: 794

Answers (1)

phd
phd

Reputation: 94502

It's the OS' limit so you don't have any other options but to limit the shebang length.

Install into a directory with shorter path. Or create a symlink with shorter path and use the symlink in the shebang.

Upvotes: 1

Related Questions