简体   繁体   English

使用Python 3.6在Raspberry Pi 3 Model B上安装virtualenvwrapper

[英]Installing virtualenvwrapper on a Raspberry Pi 3 Model B with Python 3.6

I have been trying to download/install virtualenvwrapper on a Raspberry Pi 3 Model B, but I get an error message when using the command "source ~/.profile" in the terminal. 我一直试图在Raspberry Pi 3 Model B上下载/安装virtualenvwrapper,但是在终端中使用命令“ source〜/ .profile”时出现错误消息。 I am trying to install OpenCV with python 3.6, but I need to set up virtualenvwrapper. 我正在尝试使用python 3.6安装OpenCV,但是我需要设置virtualenvwrapper。 The error I get when I run "source ~/.profile" is: 运行“ source〜/ .profile”时出现的错误是:

/usr/bin/python: 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=/usr/bin/python and that PATH is
set properly.

I am following this online guide: https://www.pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/ 我正在关注此在线指南: https : //www.pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/

Any help would be appreciated, thanks in advance. 任何帮助将不胜感激,在此先感谢。

设法修复它,不得不重写“〜/ .profile”。

Change 更改

VIRTUALENVWRAPPER_PYTHON=/usr/bin/python

to

VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/pythonx.x

( xx is the Python version). xx是Python版本)。

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

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