4

for some reason, ' ' value (empty value) was added to my sys.path array and I can't run 'setup.py install'. I can't find a way to remove it permanently. I did it through python shell:

sys.path.remove('')

and it removes it until closing the shell. I couldn't find a good answer for permanent removing. I did find this - What sets up sys.path with Python, and when? but I'm sure there must be a better way.

Community
  • 1
  • 1
user2880391
  • 2,683
  • 7
  • 38
  • 77

1 Answers1

-1

You can use PYTHONPATH

  1. You can append the path to $PATH, and not to $PYTHONPATH.

  2. If you insist to change the PYTHONPATH, in some context that is preferable:

    do this:

    1. Export PYTHONPATH=$PYTHONPATH:/Users/username/pymodules

    2. To make sure you are following the convention of what to append to PYTHONPATH see What exactly should be set in PYTHONPATH?.

Community
  • 1
  • 1
Masume Ebhami
  • 348
  • 1
  • 14