zsh: permission denied (MacOS) - python-3.x

I am trying to use a tool from Openai (train a data model).
I installed openai and now try to execute this command:
/Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai tools fine_tunes.prepare_data -f /Users/finnborchers/Desktop/Code/GPT3_Training_data/training.jsonl
I get this error:
zsh: permission denied: /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai
I had the same problem from this article, but now I am stuck:
openai command not found (mac)
I am new to the terminal commands, but here is the output of echo $PATH:
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/finnborchers/Flutter_api/flutter/bin
To allow execution I tried this command:
sudo chmod +x /Users/finnborchers/Library/Python/3.8/lib/python/site-packages/openai
But then nothing happens (There is no feedback message) and I still get the permission denied message.
Maybe the chmod did not work because of the PATH?
I am thankful for any help!

Solution: I had to run the first installation with sudo.

Related

Solution for Linux "permission denied"

I am pretty new to the Ubuntu environment and I have a question regarding the solution to "permission denied" error.
When I am trying to run the following command that executes a shell script and writes the result into a txt file, I get the permission denied error.
./test_image.sh > testCase.txt
I know that I can just sudo run the command, but I am hoping to do this command through a Java program and was wondering if there would be a way to give permission to any user that is trying to run this command.
Thank you in advance!!
Why do you have permission deny error? Maybe you need to give your script rights to execute (eg. chmod +x test_image.sh) or give the user rights to write/change testCase.txt in a given directory. I am afraid you need to learn a bit about standard permissions or even ACLs, Selinux policy, setuid, sticky bits, etc.

VS code, output is not showing

I installed vs code, python and git bash. I integrated everything.
while printing anything, it's showing PERMISSION DENIED in terminal. Can anyone help how to execute the code.
I believe it's because you need to give yourself permission to execute the file.
Refer to this post: sudo open -e ~/.bash_profile Permission denied mac
Hope this helps

Kivy-iOS toolchain wont run 'Permission Denied'

Im trying to convert a kivy app to run on iOS and have followed the information on the kivy site. However, once everything is downloaded the first step is to compile the toolchain process, which I cant do. So the command
./toolchain.py openssl kivy
returns
./toolchain.py: Permission denied
No other messages so a bit difficult to troubleshoot. I found this post. That suggestion hasn't been accepted or marked as correct, but I tried anyway and changing permissions doesn't fix the problem. I have tried
chmod a+x toolchain.py
sudo chmod 755 ./toolchain.py
sudo chmod 755 ./toolchain.py
All of which change the permissions as expected but trying to run toolchain now gives me
from: can't read /var/mail/kivy_ios.toolchain
./toolchain.py: line 4: syntax error: unexpected end of file
So changing permission doesn't seem to work either and I'm now out of ideas???
Also for info I'm running kivy in a venv on Catalina
So - it turns out after updating XCode you have to reselect the command line tools. Then it all works fine.
This answer is for future users. If any of the above answers don't work.
Use this https://pypi.org/project/kivy-ios/ and follow all the instructions

Installing rclone according to the official instructions but permission denied

Noob question, but hear me out
So I installed rclone word-for-word according to this (https://rclone.org/install/)
However, when I got around to rclone config the terminal returned 2020/02/28 11:37:29 Failed to load config file "/home/myUser/.config/rclone/rclone.conf": open /home/myUser/.config/rclone/rclone.conf: permission denied
In an attempt to fix this I ran chmod u+x "/home/myUser/.config/rclone/rclone.conf" which returned chmod: changing permissions of '/home/myUser/.config/rclone/rclone.conf': Operation not permitted
Then I ran the same command prefixed with sudo which seemed to work. Yet after running rclone config again the same permission denied error appeared. What should I do? What did I do incorrectly during install? I just want to be able to run rclone config without having to use sudo.
Unrelated side note I had a similar experience with Anaconda in which I can't run the command for opening the program without sudo but as I ran the command with it the launcher appears with an error message which I can't remember exactly but it ran along the lines of: "Cannot run in sudo mode, please do it again in user mode." Funny Catch-22 if you ask me. I ended up uninstalling it.
Solution: set the permissions of rclone.conf to chmod 777. I changed the whole folder and its files using sudo chmod -R 777 /home/myUser/.config/rclone/ for good measure. Now I can finally retry installing Anaconda.

while executing following command, why am I getting permission denied? I am trying to run this on HDP

I installed Jupyter on Hortonworks Sandbox and wanted to run jupyter using port forwarding.
I followed these steps : https://hortonworks.com/hadoop-tutorial/using-ipython-notebook-with-apache-spark/
I am not able to start Jupyter using
./start_ipython_notebook.sh
I tried /root/start_ipython_notebook.sh but getting permission denied.
run ls -la in that directory what does it output?
You will probably see that the file you are trying to run doesn't allow your amar user to run it.
To solve this, either install jupyter in another directory where it has the correct user rights. Or use the chown and chmod to give you the correct rights over those files inorder to run them.

Resources