Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm - $PATH on OS X

Tags:

pycharm

I need to debug an py-script in PyCharm that makes use of unix binaries like "which, grep" and so on.

If I start the py-script from Terminal (bash), unix binaries are found and all works like expected. If I start the script from PyCharm "Debug" or "Run", there seems to be no "PATH" set => the unix binaries were not found.

Am I missing sth.?

like image 555
user1130588 Avatar asked Jan 04 '12 18:01

user1130588


People also ask

How do I give a path in PyCharm?

Create a new path variablePress Ctrl+Alt+S to open the IDE settings and select Appearance & Behavior | Path Variables. and enter the name of the new variable (for example, DATA_PATH ) and its value that points to the target directory with the data file on your disk.

Should I update PATH variable when installing PyCharm?

It is not important to change the installation destination of the PyCharm application, but you could also change the destination to be directly on your C: similarly to the Python installation. However, we suggest simply going with the default path.


2 Answers

Add the PATH environment variable to your Run Configuration (Run->Edit Configurations…) like this: /usr/local/bin:$PATH

like image 80
Kentzo Avatar answered Sep 21 '22 19:09

Kentzo


Create a new environment variable in your run configuration named PATH, and set it equal to the output of running echo $PATH on your command line. This will let you get around the issue.

like image 26
Myer Avatar answered Sep 17 '22 19:09

Myer