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.

permission denied

See original GitHub issue

doing shiv -e cpe_m.cpe_mi:cli -o my_command.pyz . in setup.py dir and then try to run command I get this strange error msg?

[I] ➜ ./my_command.pyz
zsh: permission denied: ./my_command.pyz

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yarikopticcommented, Sep 23, 2019

I am having a similar issue with incorrect shebang:

gory details (click to expand)
/tmp > virtualenv --system-site-packages --python=python3 venvs/dev3 
Already using interpreter /usr/bin/python3                
Using base prefix '/usr'
New python executable in /tmp/venvs/dev3/bin/python3
Also creating executable in /tmp/venvs/dev3/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

/tmp > source venvs/dev3/bin/activate                               
(dev3) 
/tmp > pip install shiv              
Collecting shiv
  Using cached https://files.pythonhosted.org/packages/66/cc/67b69bffa38e620cea0d211d74f19b30304c21e584dcd407da007b30c007/shiv-0.0.48-py3-none-any.whl
Requirement already satisfied: pip>=9.0.3 in ./venvs/dev3/lib/python3.7/site-packages (from shiv) (19.2.3)
Requirement already satisfied: setuptools in ./venvs/dev3/lib/python3.7/site-packages (from shiv) (41.2.0)
Collecting click!=7.0,>=6.7 (from shiv)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Installing collected packages: click, shiv
  Found existing installation: Click 7.0
    Not uninstalling click at /usr/lib/python3/dist-packages, outside environment /tmp/venvs/dev3
    Can't uninstall 'Click'. No files were found to uninstall.
Successfully installed click-6.7 shiv-0.0.48
(dev3) 
/tmp > shiv requests -o requests.pyz --quiet
(dev3) 
/tmp > ./requests.pyz 
zsh: permission denied: ./requests.pyz
(dev3) 
/tmp > head -n1 ./requests.pyz
#!/usr/lib/python3
(dev3) 
/tmp > ls -l /usr/lib/python3 -d
drwxr-xr-x 3 root root 4096 Oct 19  2014 /usr/lib/python3/
(dev3) 
/tmp > shiv --version
shiv, version 0.0.48
Specifying `-p '/usr/bin/env python3'` mitigates it
/tmp > shiv requests -o requests.pyz -p '/usr/bin/env python3' --quiet
(dev3) 
/tmp > ./requests.pyz 
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 
0reactions
jhermanncommented, Jan 30, 2020
$ python3 -m this | grep guess
In the face of ambiguity, refuse the temptation to guess.

If you ask me, -p should be a mandatory option. 😉

Possibly allowing things like {pymajor} based on the running interpreter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve the "Permission Denied" error in Linux
While using Linux, you may encounter the error, “permission denied”. This error occurs when the user does not have the privileges to make...
Read more >
Function Compute:What can I do if the "permission denied ...
When I develop a function on an on-premises machine that runs the Windows or macOS operating system, the executable file is normally executed...
Read more >
How to fix 'permission denied' error in Linux? [Solutions]
What is Linux Permission Denied Error? This type of error will occur whenever you run a command for which you do not have...
Read more >
How to Fix Shell Script Permission Denied Error in Linux
The shell script permission denied error occurs when the shell script you're trying to run doesn't have the permissions to execute. Linux tells ......
Read more >
Permission denied in Mac Terminal? Try this fix - MacPaw
If you use Terminal to execute commands, you may come across a 'permission denied' error. Here's how to fix it.
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