'psql' is not recognized as an internal or external command
Answer a question
I have installed postgresql 10 on my windows 10 and added those paths
(C:\Program Files\PostgreSQL\10\bin) , (C:\Program Files\PostgreSQL\10\lib)
but when i go to the CMD under administration rights and test PSQL or psql --version ... i still get the same error
'psql' is not recognized as an internal or external command
i tried echo %path%
and i can see the path there correct
I'm actually trying to link Flask to Heroku database that is why i have installed Postgresql so the pc can be familiar with psql commands
Answers
Have you added the Postgres binaries to your path in windows? It would seem that this is a likely cause of your issue.
To add to your path follow these steps (pulled from https://www.java.com/en/download/help/path.xml -- yes I know it is java but the premise is the same):
- Windows 10 and Windows 8
- In Search, search for and then select: System (Control Panel)
- Click the Advanced system settings link.
- Click Environment Variables.
- In the section System Variables, find the PATH environment variable and select it. Click Edit.
- If the PATH environment variable does not exist, click New.
- In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable.
- Click OK.
- Close all remaining windows by clicking OK.
- Reopen Command prompt window, and run your java code. (in our case psql)
You would add the bin folder to your path rather than just an individual binary. For reference also see this question: How to set Postgres path variable on Windows 10
更多推荐
所有评论(0)