dedian9上requests库安装了,但是脚本找不到
https://s1.ax1x.com/2020/07/09/UeCzCQ.jpg我试过在Python的安装目录下安装requests,用setup.py 安装过重启过很多遍了 还是不行 乖乖用电脑吧
你 Debian 上是不是有多个版本的 Python?导致你前面安装的是安装在其他版本的 Python 用pip:
pip install requests -i https://mirrors.aliyun.com/pypi/simple 养成良好的开发习惯,每一个项目都使用 virtualenv
# divinerapier @ zephyrus in ~/venv C:130
$ pip install virtualenv -i https://mirrors.aliyun.com/pypi/simple
# divinerapier @ zephyrus in ~
$ which python
/usr/sbin/python
# divinerapier @ zephyrus in ~
$ python -V
Python 3.8.3
# divinerapier @ zephyrus in ~
$ virtualenv -p /usr/sbin/python --no-download venv
created virtual environment CPython3.8.3.final.0-64 in 267ms
creator CPython3Posix(dest=/home/divinerapier/venv, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/divinerapier/.local/share/virtualenv)
added seed packages: pip==20.1.1, setuptools==49.1.0, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
# divinerapier @ zephyrus in ~
$ cd venv
# divinerapier @ zephyrus in ~/venv
$ source bin/activate
(venv)
# divinerapier @ zephyrus in ~/venv
$ which python
/home/divinerapier/venv/bin/python
(venv)
# divinerapier @ zephyrus in ~/venv
$ which pip
/home/divinerapier/venv/bin/pip
(venv)
# divinerapier @ zephyrus in ~/venv
$
页:
[1]