I'm trying to use clarifai with python, I've installed the package using pip, but then it says (here) to get started by configuration as follows.
Configuration
The client uses CLARIFAI_APP_ID and CLARIFAI_APP_SECRET for authentication and token generation. You can get those values from https://developer.clarifai.com and then run:
$ clarifai config
CLARIFAI_APP_ID: []: ************************************YQEd
CLARIFAI_APP_SECRET: []: ************************************gCqT
The config will be stored under ~/.clarifai/config for client's use
But I do not understand where I "run" this from and do i need the "$". I've tried running it from python command prompt and windows command terminal but it just gives errors.
I have a Python27/scripts folder, in this I have a file caled 'clarifai' but with unknow extension i.e. I dont know if its a .py file or .exe file, I have no idea. If I open that file in notepad it reads
""" the clarifai command line utility,
Basically it helps to setup the environmental variables for the
API Clients """
So this is exactly what I want to do set the 'environmental variables' CLARIFAI_APP_ID: and CLARIFAI_APP_SECRET: but i have no idea how to do this. I tried to run this in the windows command terminal and in the python terminal but get errors both times.
someone suggested below "You should probably run in the folder you installed it to". But I did not install this, pip installed this I I dont understand where it installed it to?
Where should do you think they are implying I run this from?
You do not need the $. You should probably run in the folder you installed it to, provided you didn't add to %PATH% yet. If you did, anywhere should be fine. Windows CMD or PowerShell is probably what they want.
Related
please I need your help here!
My system crashes each time i run a python command in terminal. When i run something like python app.py, my Mac will crash and bounce, and reset.
In Terminal,
When i run python -V, it returns Python 3.7.6,
When i run python3 -V, it returns Python 3.8.5
When i run which python, it returns /opt/miniconda3/bin/python.
A moment ago, i was trying to build a standalone app, and turned on virtualenv. However no matter how hard i tried, i failed. Then i deleted the virtualenv folder in the app folder.
Perhaps during the development processes, in Visual Studio Code, i accidentally "linked" the virtualenv with the python interpreter 3.7 (/opt/miniconda3/bin/python), which was set as the default python system long ago (i can't even recall when and how). After the virtualenv folder deletion, i remember the interpreter had the word "cached" in the front of the python version. Somehow i turned on and off this and that, and restarted the app, i have get rid of the word "cached". But the system still crashes .
My Mac crashes now every time i run a python command in Terminal. Please help!
i even have tried update conda update conda, it says no such directory,
ofcoruse i then tried update miniconda, same answer.
You should remove it from your path.
To do so, check for the miniconda3 entry in the file named ~/.bashrc, ~/.bash_profile, and /etc/profile file and comment out the line:
export PATH=/opt/miniconda3/bin:$PATH
by preceding it with the # character.
I've prepared a module that's ready to be uploaded to PyPI, the folder 'nester' has all the necessary components. Equipped with the build, dist, MANIFEST, and the two python files (setup.py and nester.py). Whenever I go to admin PowerShell I try running the final command to download it onto my local python file.
python.exe setup.py install
it spits back out 'permission denied', am I putting in the wrong command? the textbook I'm working from is working on terminal while I'm on Windows. The aforementioned textbook inputs
Sudo python3 setup.py install
and it seems to work perfectly for him 😒
here's what happens every time I try to run it
This likely happens, as the installer is trying to write into C:\Program Files directory. Ordinary user accounts do not have permission to do so, as the error Access Denied says.
/In *nix systems, sudo is used to act as root, and root can do anything. Thus permissions aren't an issue in the book sample.)
To illustrate your Windows case, see the image below. In the first case, ordinary user is trying to create test.txt into C:\Program Files. It fails, as expected. The second case does the same, but this time Command Prompt is started with administrative privileges.
As for a fix, you need to run the command in elevated command prompt. The prompt should have window title Administrator: Command Prompt, not C:\Windows\system32\cmd.exe.
I'm pretty new to the community, and new to python. I know the basics. But now I'm trying to download third party modules via pip but everything I do regarding pip displays an error. I know that pip comes with python seeing as the pip file is there.
I am running python 3.6 and windows 10. I have downloaded pip off the internet also but when I try to run the program it says already downloaded. The first time I ran it it said that it was downloading and successfully downloaded so I'm kind of lost.
Thanks!
Sounds like it's already properly installed. pip is a program called from a system terminal, not from a Python prompt. Open up a command prompt and type pip -h see what happens. If this does not print out the help page on how to use pip, and instead you get an error to the effect of:
"pip" is not recognized as an internal or external command, operable program or batch file
You then need to point Windows where to find the program (pip.exe) by adding your Python scripts folder C:\...\Python36-32\Scripts\ to your environment PATH variable. To do this, open the Start menu and search for "environment variables". Open the dialogue and find one named PATH (case doesn't matter). If it doesn't exist, create it. Edit the value and add the file path to the scripts folder to the end using ; as a separator.
As per your comment, if you are getting an access denied windows error this answer from another question may help you.
You need need to be sure either your powershell is being run as administrator, or by creating a virtual environment.
The Installing Packages docs have a great overview, and instructions.
https://packaging.python.org/installing/#use-pip-for-installing
I am having an issue with implementing git hooks with the Github Desktop client for windows. When I created the hook, it runs a python script that checks the commit message. The weird part is, it runs on perfectly fine on Windows with command prompt, powershell, tortoisegit, webstorm IDE, git bash, also works on Linux terminal, EXCEPT for Github Windows client. reading the debug log, i get this error
GitHub.IO.ProcessException: /usr/bin/env: python: No such file or directory
My already attempted solutions:
adding 'python' as system variable
using ruby
removing '/usr/bin/env' (this will throw an error saying this file doesn't exists)
adding a .bashrc file solution i found online by putting the python path in my home directory
Does anyone have any idea how to fix this?
This error means that Git cannot find
To fix that, append C:\Python (or wherever you installed python) to your PATH environment variable in windows (control panel > System).
Once you set it up test the hook again.
Another option is to create a .bashrc file in your %USERPROFILE% directory and set the variable there:
export PATH=/c/Python:$PATH
Again - check to see that it fixed the problem.
I am trying to install Django by using a tutorial.(tutorial.)
I download the latest release (1.6.2) and untar(unzip) it.
Then I open the file that contains Django on my Desktop and copy the Directory.
I open the command prompt.
From C:\Users\Name\Desktop> I type cd and I paste the Directory.
This opens the Django directory which is C:\Users\Name\Desktop\Django-1.6.2
Inside this file there is a setup.py file.
According to the tutorial if I type python setup.py install it will install Django for me! And this actually happens in the tutorial video but not in my case!!!
When I type it gives me the following:
'python' is not recognized as an internal or external command, operable program or batch file.
If I go into the Django file and Double-click the setup.py file I momentarily see in the window (before it closes) error: no commands supplied
What must I do? I am trying to install Django for 2 days now and it is getting really frustrating.
SOLVED
Must set Path Variable from Environmental Variables FIRST!
For a quick solution, look at the answer + this post and choose melhosseiny's answer.
Use the command C:\Python27\python setup.py install
Additionally, if you don't want to add C:\Python27\ to all of your python commands, you need to add it to your Windows Path. This can be done by going to your environment variables and add C:\Python27 (notice the lack of a trailing slash) to the PATH variable. Make sure you are adding to, not replacing, the values there are present.