简体   繁体   中英

Get this error: "bash: export: `=': not a valid identifier" in my VSCode Terminal

Whenever I open my VSCode Terminal (which I don't use for Python), I get the above error. It doesn't happen whenever I use the regular terminal. I remember I tried to download Gecko Driver and set up a Python virtual environment and I had to mess around with some file and export PATH. However, I forgot the name of the file so I don't know what to do. I don't understand why this shows up in my VSCode Terminal. I've looked at previous answers to this question, such as going to my ./bash_profile but I don't have this file on my computer.

I should also say I get this error right underneath it but I have no idea what it means. bash: export: `~/Users/MY_NAME/geckodriver:/Users/MY_NAME/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/MY_NAME/anaconda3/bin:/Users/MY_NAME/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/Users/MY_NAME/.nvm/versions/node/v12.18.3/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/MY_NAME/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/Users/MY_NAME/opt/miniconda3/bin:/Users/MY_NAME/opt/miniconda3/condabin:/Users/MY_NAME/.pyenv/shims': not a valid identifier

Turns out it was actually a hidden file in my home directory called .bash_profile and in the last line I had added something about export PATH and gecko driver. I just removed the line and the error went away.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM