首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >摇尾安装:未找到Wagtail命令

摇尾安装:未找到Wagtail命令
EN

Stack Overflow用户
提问于 2018-01-15 10:27:40
回答 2查看 1.8K关注 0票数 2

我正在尝试安装摇尾。正如文档所建议的那样,我使用pip安装了wagtail:

代码语言:javascript
复制
tigran@tigran:~/projects/website$ pip install wagtail
Collecting wagtail
  Using cached wagtail-1.13.1-py2.py3-none-any.whl
Collecting html5lib<1,>=0.999 (from wagtail)
  Using cached html5lib-0.999999999-py2.py3-none-any.whl
Collecting Django<1.12,>=1.8.1 (from wagtail)
  Using cached Django-1.11.9-py2.py3-none-any.whl
Collecting djangorestframework<3.7,>=3.1.3 (from wagtail)
  Using cached djangorestframework-3.6.4-py2.py3-none-any.whl
Collecting django-treebeard<5.0,>=3.0 (from wagtail)
Collecting Pillow>=2.6.1 (from wagtail)
  Using cached Pillow-5.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting Unidecode>=0.04.14 (from wagtail)
  Using cached Unidecode-1.0.22-py2.py3-none-any.whl
Collecting django-taggit<1.0,>=0.20 (from wagtail)
  Using cached django_taggit-0.22.2-py2.py3-none-any.whl
Collecting django-modelcluster<4.0,>=3.1 (from wagtail)
Collecting Willow<1.1,>=1.0 (from wagtail)
  Using cached Willow-1.0-py2.py3-none-any.whl
Collecting beautifulsoup4>=4.5.1 (from wagtail)
  Using cached beautifulsoup4-4.6.0-py2-none-any.whl
Collecting requests<3.0,>=2.11.1 (from wagtail)
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting six (from html5lib<1,>=0.999->wagtail)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting webencodings (from html5lib<1,>=0.999->wagtail)
  Using cached webencodings-0.5.1-py2.py3-none-any.whl
Collecting setuptools>=18.5 (from html5lib<1,>=0.999->wagtail)
  Using cached setuptools-38.4.0-py2.py3-none-any.whl
Collecting pytz (from Django<1.12,>=1.8.1->wagtail)
  Using cached pytz-2017.3-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests<3.0,>=2.11.1->wagtail)
  Using cached idna-2.6-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests<3.0,>=2.11.1->wagtail)
  Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests<3.0,>=2.11.1->wagtail)
  Using cached certifi-2017.11.5-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0,>=2.11.1->wagtail)
  Using cached chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: six, webencodings, setuptools, html5lib, pytz, Django, djangorestframework, django-treebeard, Pillow, Unidecode, django-taggit, django-modelcluster, Willow, beautifulsoup4, idna, urllib3, certifi, chardet, requests, wagtail
Successfully installed Django-1.11.9 Pillow-5.0.0 Unidecode-1.0.22 Willow-1.0 beautifulsoup4-4.6.0 certifi-2017.11.5 chardet-3.0.4 django-modelcluster-3.1 django-taggit-0.22.2 django-treebeard-4.2.0 djangorestframework-3.6.4 html5lib-0.999999999 idna-2.6 pytz-2017.3 requests-2.18.4 setuptools-38.4.0 six-1.11.0 urllib3-1.22 wagtail-1.13.1 webencodings-0.5.1

但是,当我试图创建一个项目时,我会得到以下错误:

代码语言:javascript
复制
tigran@tigran:~/projects/website$ wagtail start website
wagtail: command not found

这里怎么了?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-04-26 09:13:44

我想“煤气门”的评论是正确的。在virtualenv之外运行入门命令也会在Ubuntu16.04中为我带来这个问题。

您需要创建并激活一个虚拟环境,这样它才能工作。假设您已经安装了virtualenv:

代码语言:javascript
复制
mkdir myproject && cd myproject
virtualenv yourvirtualenv -p /usr/bin/python3
source yourvirtualenv/bin/activate
pip install wagtail
wagtail start website
票数 10
EN

Stack Overflow用户

发布于 2020-02-28 00:56:36

另一种方法是使用内置于Python3.6及更高版本的-m venv命令。

检查Python版本

代码语言:javascript
复制
python --version

创建venv并安装需求

代码语言:javascript
复制
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

安装完成后,尝试运行wagtail命令。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48261062

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档