I am trying to use an anaconda virtualenv, which gets created successfully but I cannot source it. When I run source activate myenv I end up getting syntax errors:

bash: activate: line 39: syntax error near unexpected token `}'
bash: activate: line 39: `}'

I obviously did't touch the activate script, and I have the feeling it has nothing to do with anaconda: I just noticed that I get a syntax error when trying to source .bashrc too:

bash: .bashrc: line 184: syntax error: unexpected end of file

Opening new terminals doesn't give any errors, meaning that there isn't actually an error in my .bashrc.

Doing a bit of research, I found people having issues with file encodings, e.g. moving files from Windows to linux, but it's not my case. I didn't do any such thing and I already tried converting the formats to unix.

Did I break the source command? But how..? Any cues on how ti fix it? Thanks!

I am using ubuntu 16.04 and (if it means anything), anaconda3 4.4.7

  • Where did you get Anaconda v4.4.7? The repo only has v4.4.0. Did you try a current version? Did you report that to their bugtracker? – ckujau Jan 22 '18 at 5:48
  • I downloaded anaconda directly from its website. I haven't tried the repo version yet, I might as well give it a try – powder Jan 22 '18 at 6:09
  • 1
    Their (semi-) current issues look promising that this could be fixed in a newer version (resp. w/ a less exotic prompt). – ckujau Jan 22 '18 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.