Home>

An error occurred when opening a terminal on a Mac.

Error message

user has been rewritten.

Last login: Sat Nov 16 14:29:40 on ttys002
/Users/user/.pyenv/versions/3.7.4/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON =/Users/user/.pyenv/shims/python and that PATH is
set properly.
-bash: /Users/user/.bash_profile: line 11: unexpected EOF while looking for matching `" '
-bash: /Users/user/.bash_profile: line 12: syntax error: unexpected end of file
Applicable source code

Looking at bash_profile, it looks like this:
Judging from the contents of the error, are you confused about where the file ends?
I don't know what's wrong.

export PYENV_ROOT = "${HOME} /. pyenv"
export PATH = "${PYENV_ROOT}/bin: $PATH"
eval "$(pyenv init-)"
if [-f ~/.bashrc];then
    ~/.bashrc
fi
if [-f ~/.bashrc];then
    ~/.bashrc
fieval "$(pyenv init-)"
eval "$(pipenv --completion)"
~
~
~
~
~
~
~
~
~
~
~
~
"~/.bash_profile" 11L, 241C

There are also errors that are not only this.

Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.

https://qiita.com/yasudadesu/items/1177aa93229e7c4b7a45
I re-added pyenv with reference to this article, but it has not changed.


pipenv --python 3.7.3 is as follows.

pyenv: pipenv: command not found
The `pipenv 'command exists in these Python versions:
  3.6.6
  anaconda3-5.0.1


And I don't understand why.
Originally I wanted to do pipenv --python 3.7.3, but as I researched and tried many things, the situation is now.

What should I do about this?
It will be helpful if you can tell me what you understand.

  • Answer # 1

    Please break the following 1 line into 2 lines.

    # Wrong
    fieval "$(pyenv init-)"
    ↓
    # Positive
    fi
    eval "$(pyenv init-)"

  • Answer # 2

    After restarting, it now works as intended.