在 Ubuntu 18.04 上安装 Virtualenvwrapper 的问题? [英] Issue installing Virtualenvwrapper on Ubuntu 18.04?

查看:66
本文介绍了在 Ubuntu 18.04 上安装 Virtualenvwrapper 的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全新的 Ubuntu 18.04 安装.按照这些说明,这里是我迄今为止运行的命令.

Fresh Ubuntu 18.04 install. Following these instructions here are the commands I've run so far.

sudo apt update
sudo apt upgrade
python3 -V 
sudo apt install python3-pip
sudo apt install build-essential libssl-dev libffi-dev python3-dev
sudo apt install python3-venv
source /usr/local/bin/virtualenvwrapper.sh

退货

bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory.

find virtualenvwrapper.sh

退货

find: ‘virtualenvwrapper.sh’: No such file or directory

Sudo -H pip3 install virtualenv virtualenvwrapper

也没有解决问题.

我发现这个解决方案解决了这个问题.

I found this solution that sovled the issue.

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3

然后确保使用以下命令安装 virtualenv 和 virtualenvwrapper:

then make sure to install virtualenv and virtualenvwrapper with:

sudo /usr/local/bin/pip3 install virtualenv virtualenvwrapper

您可能必须像我一样使用 sudo 的 -H 标志才能使其工作.

You may have to use sudo's -H flag like I did for it to work.

推荐答案

在 Ubuntu 18.04 上,我必须将此添加到我的 .bash_profile

on Ubuntu 18.04 I had to add this to my .bash_profile

# virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenv
export VIRTUALENVWRAPPER_LOG_DIR="$WORKON_HOME"
export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME"
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source ~/.local/bin/virtualenvwrapper.sh

然后运行 ​​source ~/.bash_profile

Then run source ~/.bash_profile

这篇关于在 Ubuntu 18.04 上安装 Virtualenvwrapper 的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆