How sys.path path under linux python interpreter added

A. When using pycharm, pycharm will automatically put our new projects are added to sys.path each path, we do not involve in the course of

  Processing project path, but when the project is deployed to linux, the problem comes, I can not pycharm on linux to help us solve the processing path as follows:

  1. Use the form to add the command line, although convenient, but only takes effect on this dialogue, next time processing

      After export PYTHONPATH = / home / directory / project root / # equals the root directory path item

  2. Edit Profile

      vim /etc/profile

      Re-login to take effect after the last line, add the following command to complete, save and exit

      export PYTHONPATH = / home / directory / project root directory / 

  3. edit configuration files, log back in, takes effect only for the logged-on user when editing

      vim ~/.bash_profile

      Re-login to take effect after the last line, add the following command to complete, save and exit

      export PYTHONPATH = / home / directory / project root directory / 

Guess you like

Origin www.cnblogs.com/quzq/p/11078677.html