lofar-astron / factor

Facet calibration for LOFAR
http://www.astron.nl/citt/facet-doc
GNU General Public License v2.0
19 stars 12 forks source link

setting PYTHONPATH screws up bash #196

Closed amisk closed 7 years ago

amisk commented 7 years ago

Hey,

Sorry, this is actually not a factor issue and I postet this here in the factor issues by accident, but I dont see any other site where this could be in. If I'm wrong, please movie it to the appropriate site (lofar-deploy?)

I have a weird issue. I installed the current lofar software on two separate machines, both run linux mint 17.x. The installation was sucessful, and at least the genericpipeline is already running. But here's the weir part. If you type something into bash that is not found, say "NDPP", it should only report that the command is not found. Now both machines, if I try to start something that does not exist, report

Traceback (most recent call last): File "/usr/lib/command-not-found", line 23, in import gettext File "/usr/lib/python2.7/gettext.py", line 89 raise ValueError, \ ^ SyntaxError: invalid syntax

I tested it a bit, and this issue appears as soon as the $PYTHONPATH is set. If this is not set, no problem occurs. Sadly, I cannot figure out why simply setting a path would screw up bash ... Any ideas? Thx.

mhardcastle commented 7 years ago

Your system is configured to run the command-not-found python script whenever you type something that's not a valid command. Something in the PYTHONPATH is causing it not to work. Not really a factor problem, more a command-not-found problem -- I would simply remove the latter (sudo apt-get remove command-not-found) since I don't suppose you actually need it.

amisk commented 7 years ago

I know, it is not a factor issue. I noticed I was in the factor github after I postet, so I closed it, but then reopened it because I did not find a more suitable place for this.

Yes, I could just remove this command_not_found tool, but it comes with linux mint, so I would rather not delete it.

mhardcastle commented 7 years ago

Well everybody else seems to live without it! It is aimed at naive users who need help using the command line, which is not really factor's target audience. I would suggest you raise the problem with the people managing the mint distribution.

nudomarinero commented 7 years ago

command-not-found is a Python 3 program but with the changes in the PYTHONPATH it tries to load Python 2 dependencies and raises a syntax error.