title: Environment Munging in Anaconda, PyCharm, and Jupyter Notebooks? No such file or directory: 'conda'
body: <p>Regular PyCharm, Anaconda and Jupyter user, but for the first time I'm starting a project that would benefit with having them all play together:</p>
  
  <p>I have a correctly configured Anaconda environment running within PyCharm, however when I try to launch <code>ipynb</code> notebooks (that work perfectly well in <code>jupyter notebook</code> from within PyCharm, I get...</p>
  
  <pre><code>/home/bolster/anaconda3/bin/python3.5 /home/bolster/anaconda3/bin/jupyter-notebook --no-browser --ip 127.0.0.1 --port 8888
  [W 12:33:12.515 NotebookApp] Unrecognized JSON config file version, assuming version 1
  [W 12:33:12.519 NotebookApp] Config option `matplotlib` not recognized by `NotebookApp`.
  [W 12:33:12.521 NotebookApp] Config option `matplotlib` not recognized by `NotebookApp`.
  Traceback (most recent call last):
    File "/home/bolster/anaconda3/bin/jupyter-notebook", line 6, in &lt;module&gt;
      sys.exit(notebook.notebookapp.main())
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
      return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 595, in launch_instance
      app.initialize(argv)
    File "&lt;decorator-gen-7&gt;", line 2, in initialize
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 74, in catch_config_error
      return method(app, *args, **kwargs)
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/notebook/notebookapp.py", line 1069, in initialize
      self.init_configurables()
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/notebook/notebookapp.py", line 837, in init_configurables
      parent=self,
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 19, in __init__
      specs = self.find_kernel_specs() or {}
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 129, in find_kernel_specs
      self.conda_info = self._conda_info()
    File "/home/bolster/anaconda3/lib/python3.5/site-packages/nb_conda_kernels/manager.py", line 29, in _conda_info
      p = subprocess.check_output(["conda", "info", "--json"]
    File "/home/bolster/anaconda3/lib/python3.5/subprocess.py", line 629, in check_output
      **kwargs).stdout
    File "/home/bolster/anaconda3/lib/python3.5/subprocess.py", line 696, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/home/bolster/anaconda3/lib/python3.5/subprocess.py", line 950, in __init__
      restore_signals, start_new_session)
    File "/home/bolster/anaconda3/lib/python3.5/subprocess.py", line 1544, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'conda'
  </code></pre>
  
  <p>I have a hunch that this is because PyCharm isn't attempting to launch the notebook in a "real" user environment and as such isn't getting my $PATH imports (in <code>.profile</code>), however as this isn't a "Run Configuration" I can't see any way to "point" the IDE to look in the right path for the <code>conda</code> executable. </p>
  
  <p><em>However</em> if I add a link to the conda executable to <code>/usr/bin/</code>, it works, but this is an order of hackery on a collaborative project that I'm not exactly happy with. </p>
  
  <p>Is there a way to force PyCharm to look in the right place or at least update the internal-global environment variables to avoid seriously telling collaborators they need to link from their userland environment to the root bins?</p>