我想在Linux上安装Django Web框架2.2.4版。我正在将Linux mint 19.1与python2(默认),python3.6.8(默认)和python3.7.4(从源安装的sudo)配合使用。
我正在使用命令pipenv --python3.7 install django==2.2
进行安装,但无法正常工作。
我尝试了本教程来安装Django- link to the youtube tutorial
$ python3.7 -V
>>> Python 3.7.4
$ pip3 -V
>>> pip 19.2.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
~ dev/try_django$ pipenv --python3.7 install django==2.2.4
Usage: pipenv [OPTIONS] COMMAND [ARGS]...
Try "pipenv -h" for help.
Error: no such option: --python3.7
答案 0 :(得分:3)
如果您运行class CObjectKey
{
public:
CObjectKey(int type, int index)
: type_(type), index_(index)
{
}
bool operator <(const CObjectKey& right) const
{
if (this == &right)return false;
return (type_ < right.type_) || (type_ == right.type_ && index_ < right.index_);
}
private:
int type_;
int index_;
};
int main()
{
std::map<CObjectKey, std::string> map1;
map1.emplace(CObjectKey(1, 2), "val_1_2");
map1.emplace(CObjectKey(1, 3), "val_1_3");
std::cout << "Hello World! " << map1[CObjectKey(1,3)] << std::endl;
}
,pipenv将打印出其帮助页面。在底部附近,将有一些示例。这些样本包括:
pipenv -h
如您所见,Usage Examples:
Create a new project using Python 3.7, specifically:
$ pipenv --python 3.7
和--python
部分之间缺少空格。