numpy - 无法为 python 3.6.5 安装 numpy
问题描述
我正在尝试使用命令安装 numpypip3 install numpy
但我收到以下错误:
Collecting numpy
Using cached https://files.pythonhosted.org/packages/35/d5/4f8410ac303e690144f0a0603c4b8fd3b986feb2749c435f7cdbb288f17e/numpy-1.16.2-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: numpy
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/site-packages/numpy-1.16.2.dist-info'
Consider using the `--user` option or check the permissions.
它说permission denied
所以我运行它sudo
并正确安装。
但是,当我使用任何使用 numpy 的脚本时,python3 abc.py
我收到一条错误消息,指出没有名为 numpy 的模块。它适用于 sudo
如何安装 numpy 以在没有 sudo 的情况下使用?
我在 Ubuntu 18.04 上运行 python 3.6.5
解决方案
推荐阅读
- javascript - 无法在函数中获取 Usestate 的值
- javascript - 带有 SignalR 服务的 Azure 函数 CORS 配置不起作用
- python - 为什么 matplotlib 不在此灰度图像中绘制所有黑线?
- ios - Swift 协议 Getter 和 Setter
- python - 在类中使用 namedtuple
- react-native - 无法在 Expo Camera recordAsync 上设置“质量”
- mobile-robot-toolkit - .simplemap 到 octomap/点云和地面实况机器人位姿转换
- android - 保证金不适用于视图 API 22
- vba - 使用 Word 宏/VBA 将表格从一个 Word 文档复制到另一个 Word 文档
- c# - 如何将 API 的 Body 参数传入 C#