sudo pip3 install chardet-5.1.0.tar.gz [sudo] password for ubuntu: The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Processing ./chardet-5.1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.6/tokenize.py", line 452, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-l64mmjzv-build/setup.py' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-l64mmjzv-build/
时间: 2024-03-29 10:35:13 浏览: 26
这个错误提示显示找不到 `/tmp/pip-l64mmjzv-build/setup.py` 这个文件。这可能是由于缺少依赖项或网络问题导致的。你可以尝试以下解决方法:
1. 确认是否已经安装了 `setuptools` 和 `wheel` 这两个依赖项,如果没有,请先安装:
```
sudo pip3 install setuptools wheel
```
2. 检查你的网络连接是否正常,可以尝试使用 `ping` 命令测试一下:
```
ping www.google.com
```
如果无法连接,可能需要检查你的网络设置。
3. 如果以上两个方法都没能解决问题,可以尝试清除 pip 的缓存,并重新安装:
```
sudo pip3 cache purge
sudo pip3 install chardet-5.1.0.tar.gz
```
希望这些方法能帮助你解决问题。另外,建议在使用 `sudo pip` 安装包时加上 `-H` 参数,以避免出现权限问题:
```
sudo -H pip3 install package_name
```
相关问题
我安装 :sudo pip3 install mupdf -i https://mirrors.aliyun.com/pypi/simple
这条指令是用来在 Linux 系统中安装 mupdf 的 Python 模块,并且从阿里云的镜像源中下载安装包。
sudo:表示以管理员权限运行指令。
pip3:是 Python 的一个包管理工具,用于安装和管理 Python 包。
install:是 pip3 的一个子命令,用于安装 Python 包。
mupdf:是要安装的 Python 库。
-i https://mirrors.aliyun.com/pypi/simple:是指定要从阿里云的镜像源中下载安装包。
# 获取源码库 sudo wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz # 解压进入目录 tar -zxvf ta-lib-0.4.0-src.tar.gz cd ta-lib/ # 编译安装 sudo ./configure --prefix=/usr sudo make sudo make install # 重新安装python的TA-Lib库 pip install TA-Lib==0.4.16
您想了解如何安装 TA-Lib 库和 Python 的 TA-Lib 包,是吗?
首先,您可以按照以下步骤来安装 TA-Lib 库:
1. 使用以下命令下载 TA-Lib 源码库:
```
sudo wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
```
2. 解压缩下载的文件并进入解压后的目录:
```
tar -zxvf ta-lib-0.4.0-src.tar.gz
cd ta-lib/
```
3. 执行以下命令进行编译和安装:
```
sudo ./configure --prefix=/usr
sudo make
sudo make install
```
接下来,您可以按照以下步骤重新安装 Python 的 TA-Lib 包:
1. 执行以下命令安装 TA-Lib 包:
```
pip install TA-Lib==0.4.16
```
这样就完成了 TA-Lib 库和 Python 的 TA-Lib 包的安装。如果您遇到任何问题,请随时向我提问。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)