Git Product home page Git Product logo

Comments (20)

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 跟ubuntu大同小异吧,没太大区别呀~

from blogin.

99memory avatar 99memory commented on July 17, 2024

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 可以贴一下错误详情

from blogin.

99memory avatar 99memory commented on July 17, 2024

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 可以的

from blogin.

99memory avatar 99memory commented on July 17, 2024

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 你到github上回复吧,你邮件回复的看不清楚。

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 应该不是循环导入错误,应该是有些包没有安装。

from blogin.

99memory avatar 99memory commented on July 17, 2024

#Q1error: command 'gcc' failed with exit status 1

psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1

#Q2 Error: No such command 'initdb'.
` * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.

Error: No such command 'initdb'.

  • Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
    Usage: flask [OPTIONS] COMMAND [ARGS]...
    Try 'flask --help' for help.`

#Q3Error: No such command 'admin'.

`* Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.

  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
    Usage: flask run [OPTIONS]`

#Q4 Error: While importing "wsgi", an ImportError was raised:
Traceback (most recent call last): File "/www/wwwroot/Blogin-master/venv/lib64/python3.6/site-packages/flask/cli.py", line 240, in locate_app __import__(module_name) File "/www/wwwroot/Blogin-master/wsgi.py", line 8, in <module> from blogin import create_app File "/www/wwwroot/Blogin-master/blogin/__init__.py", line 14, in <module> from blogin.extension import db, bootstrap, moment, ckeditor, migrate, login_manager, share, avatar, mail, whooshee, \ File "/www/wwwroot/Blogin-master/blogin/extension.py", line 22, in <module> import redis ModuleNotFoundError: No module named 'redis'

question
这是报错的模块

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory pip install redis python-dotenv

from blogin.

99memory avatar 99memory commented on July 17, 2024

这个我安装后还是会出现一样的错误,然后又根据网上查阅的资料:
提示使用
yum install python-devel.x86_64

pip install psutil
来进行安装
之后仍然是上面的错误
这是使用yum install python-devel的问题
question

以下是之前更加详细的问题截图:
question1

question2

question3

question4

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory yum install python3-devel,需要安装Python3的,这博客系统是依赖Python3。

from blogin.

99memory avatar 99memory commented on July 17, 2024

@weijiang1994
好滴,我发现这个问题啦,谢谢博主。还有就是我想请问下:
##更改项目端口号的是在这里更改吗?
image
(注:这个是文件app.py里面的内容)
更改后我在腾讯云centos上运行的时候发现还是在**:5000端口号;**
image

from blogin.

99memory avatar 99memory commented on July 17, 2024

不过显然这个host和port是打不开的,并不能运行。所以就想看看是不是我的端口号和地址错了

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

@99memory 你这样肯定无法访问的,第一,127是本地地址要用0.0.0.0去启动才可以访问,只能服务器本地访问,第二,5000端口应该是被防火墙禁用了,需要开启,同时在安全策略上配置一下5000端口的出入找规则。

from blogin.

99memory avatar 99memory commented on July 17, 2024

image
5000端口在腾讯云还有宝塔面板5000端口都已开放
image
我参照之前部署的一个flask项目的过程部署的,有些还不太明白,当时项目是通过:
app.run(host="0.0.0.0",port=8090)
的方式指定端口号和地址的。
博主这个博客系统比较复杂,有些地方我还没有看懂,这个是
端口和0.0.0.0的指定是在我前面提到的这个里面吗?
image

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

image 5000端口在腾讯云还有宝塔面板5000端口都已开放 image 我参照之前部署的一个flask项目的过程部署的,有些还不太明白,当时项目是通过: app.run(host="0.0.0.0",port=8090) 的方式指定端口号和地址的。 博主这个博客系统比较复杂,有些地方我还没有看懂,这个是 端口和0.0.0.0的指定是在我前面提到的这个里面吗? image

你是怎么运行的?直接flask run --host 0.0.0.0 就可以了

from blogin.

99memory avatar 99memory commented on July 17, 2024

我这个本地的话是在pycharm上开发的flask项目,它里面有flask的运行配置。不是通过命令行运行的。
腾讯云服务器中的项目是通过集成工具:python项目管理器进行部署的。

from blogin.

weijiang1994 avatar weijiang1994 commented on July 17, 2024

我这个本地的话是在pycharm上开发的flask项目,它里面有flask的运行配置。不是通过命令行运行的。 腾讯云服务器中的项目是通过集成工具:python项目管理器进行部署的。

没用过宝塔不太清楚怎么修改😂

from blogin.

99memory avatar 99memory commented on July 17, 2024

好滴,谢谢博主啦。我再研究一下。
image

from blogin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.