简体   繁体   English

没有名为virtualenvwrapper的模块?

[英]No module named virtualenvwrapper?

I'm trying to install openCV on my new Mac (Mojave).So, I'm following this tutorial . 我正在尝试在新的Mac(Mojave)上安装openCV。因此,我正在关注本教程

I want to create a new virtual whit this command: 我想创建一个新的虚拟白色该命令:

mkvirtualenv cv3 -p python3

But sometimes I get the following output on my terminal: 但是有时我会在终端上得到以下输出:

Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/keyone/code/.virtualenvs/cv3/bin/python3.7
Not overwriting existing python script /Users/keyone/code/.virtualenvs/cv3/bin/python (you must use /Users/keyone/code/.virtualenvs/cv3/bin/python3.7)
Installing setuptools, pip, wheel...
done.
/usr/bin/python: No module named virtualenvwrapper

or this output: 或此输出:

-bash: mkvirtualenv: command not found

This is how my .bash_profile file looks like: 这是我的.bash_profile文件的样子:

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export PATH=/usr/local/bin:$PATH
export WORKON_HOME=$HOME/code/.virtualenvs
export PROJECT_HOME=$HOME/code
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'

I looked on stack overflow to find a solution, but nothing is working for me. 我查看了堆栈溢出以找到解决方案,但没有任何工作对我有用。 virtualen, python etc. are already installed. virtualen,python等已经安装。

尝试使用virtualenv -p python3 envname因为它在virtualenv -p python3 envname中对我virtualenv -p python3 envname :D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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