【待反馈】我需安装Python库中的dotenv模块 但用宝塔自带的...
本帖最后由 堡塔运维小林 于 2023-8-2 14:22 编辑我应该怎么做
您好,您点击项目右侧的终端进入项目的虚拟环境中,执行下面的命令,手动按照看看是否正常
pip install dotenv 堡塔运维小林 发表于 2023-8-2 14:22
您好,您点击项目右侧的终端进入项目的虚拟环境中,执行下面的命令,手动按照看看是否正常
...
我切换到了py3.10
有一个问题在py3.10在部署运行我的项目的时候无法正确安装 requirements.txt里的依赖
2.9版本是可以正确安装 requirements.txt里的依赖的 但我现在需要3.10的环境
直接提示缺少某个模块 我想用pip安装
我在项目的右边选项里打开终端
却提示我PIP没有安装
# pip install flask
-bash: pip: command not found
我想着测试py版本 却发现是2.7的 我明明安装的3.10的版本
# python --version
Python 2.7.5
还有个问题是我安装py3.10的时候提示如下
2023-08-02 15:45:47 (1.28 MB/s) - ‘get-pip.py’ saved
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
WARNING: You are using pip version 21.2.3; however, version 23.2.1 is available.
You should consider upgrading via the '/www/server/pyporject_evn/344da30168446005d807450a6be0f08f_venv/bin/python3 -m pip install --upgrade pip' command.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
WARNING: You are using pip version 21.2.3; however, version 23.2.1 is available.
You should consider upgrading via the '/www/server/pyporject_evn/344da30168446005d807450a6be0f08f_venv/bin/python3 -m pip install --upgrade pip' command.
说是 简单说明一下 就是我想安装一个py项目 我在网站选项里安装py3.10 但安装末尾有警告 警告如上
我在部署程序的时候发现py3.10直接跳过了安装依赖的步骤运行项目失败
于是我想着直接用pip装依赖 于是我点击了右边的终端选项
我打开终端之后打算用pip安装依赖的时候 liunx提示pip没有安装 并且py版本是2.7的版本
大概就是这么个步骤
堡塔运维小林 发表于 2023-8-2 14:22
您好,您点击项目右侧的终端进入项目的虚拟环境中,执行下面的命令,手动按照看看是否正常
...
您好!我已进入终端 不正常
简单说明一下 就是我想安装一个py项目 我在网站选项里安装py3.10 但安装末尾有警告 警告如上
我在部署程序的时候 发现py3.10直接跳过了安装依赖的步骤运行项目失败(2.9的py能够安装依赖 但我需要3.10)
于是我想着直接用pip装依赖 于是我点击了右边的终端选项
我打开终端之后打算用pip安装依赖的时候 liunx提示pip没有安装 并且py版本是2.7的版本
大概就是这么个步骤 宝塔用户_pwsxho 发表于 2023-8-2 16:02
我切换到了py3.10
有一个问题在py3.10在部署运行我的项目的时候无法正确安装 requirements.txt里的依赖 ...
您好,私信我您的todesk或者向日葵,我远程看看,私信后这里回复一下 堡塔运维小林 发表于 2023-8-2 14:22
您好,您点击项目右侧的终端进入项目的虚拟环境中,执行下面的命令,手动按照看看是否正常
...
安装依赖的时候报ssl错误
堡塔运维小林 发表于 2023-8-2 16:19
您好,私信我您的todesk或者向日葵,我远程看看,私信后这里回复一下
已私信了。。。。。。 您好,这个问题解决了吗
页:
[1]