无法使用命令pip install tensorflow安装tensor flow?

无法使用命令pip install tensorflow安装tensor flow?,tensorflow,pip,Tensorflow,Pip,我遇到以下错误: 错误:由于环境错误,无法安装程序包:[Errno 13]权限被拒绝:'/usr/local/lib/python2.7/dist-packages/tensorflow-2.0.0.dist-info' 考虑使用用户< /代码>选项或检查权限。 当我使用终端进入文件夹时,我看不到任何名为tensorflow-2.0.0.dist-info的文件 我使用的pip命令是pip install tensorflow DEPRECATION: Python 2.7 will reach

我遇到以下错误: 错误:由于环境错误,无法安装程序包:[Errno 13]权限被拒绝:'/usr/local/lib/python2.7/dist-packages/tensorflow-2.0.0.dist-info' 考虑使用<代码>用户< /代码>选项或检查权限。

当我使用终端进入文件夹时,我看不到任何名为tensorflow-2.0.0.dist-info的文件

我使用的pip命令是pip install tensorflow

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tensorflow
  Using cached https://files.pythonhosted.org/packages/17/08/1ff15637a03b1565dd6cb0916b3ca6873db3a1fc69be0ed851be936e5633/tensorflow-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
Requirement already satisfied: gast==0.2.2 in ./.local/lib/python2.7/site-packages (from tensorflow) (0.2.2)
Requirement already satisfied: grpcio>=1.8.6 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.24.1)
Requirement already satisfied: numpy<2.0,>=1.16.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.16.5)
Requirement already satisfied: backports.weakref>=1.0rc1; python_version < "3.4" in ./.local/lib/python2.7/site-packages (from tensorflow) (1.0.post1)
Requirement already satisfied: tensorboard<2.1.0,>=2.0.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (2.0.0)
Requirement already satisfied: wrapt>=1.11.1 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.11.2)
Requirement already satisfied: protobuf>=3.6.1 in ./.local/lib/python2.7/site-packages (from tensorflow) (3.10.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: mock>=2.0.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (3.0.5)
Requirement already satisfied: keras-applications>=1.0.8 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.0.8)
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (from tensorflow) (0.30.0)
Requirement already satisfied: functools32>=3.2.3 in ./.local/lib/python2.7/site-packages (from tensorflow) (3.2.3.post2)
Requirement already satisfied: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow) (1.11.0)
Requirement already satisfied: absl-py>=0.7.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (0.8.1)
Requirement already satisfied: opt-einsum>=2.3.2 in ./.local/lib/python2.7/site-packages (from tensorflow) (2.3.2)
Requirement already satisfied: termcolor>=1.1.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: google-pasta>=0.1.6 in ./.local/lib/python2.7/site-packages (from tensorflow) (0.1.7)
Requirement already satisfied: enum34>=1.1.6; python_version < "3.4" in /usr/lib/python2.7/dist-packages (from tensorflow) (1.1.6)
Requirement already satisfied: tensorflow-estimator<2.1.0,>=2.0.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (2.0.0)
Requirement already satisfied: astor>=0.6.0 in ./.local/lib/python2.7/site-packages (from tensorflow) (0.8.0)
Requirement already satisfied: futures>=2.2.0; python_version < "3.2" in ./.local/lib/python2.7/site-packages (from grpcio>=1.8.6->tensorflow) (3.3.0)
Requirement already satisfied: setuptools>=41.0.0 in ./.local/lib/python2.7/site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (41.4.0)
Requirement already satisfied: werkzeug>=0.11.15 in ./.local/lib/python2.7/site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (0.16.0)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python2.7/site-packages (from tensorboard<2.1.0,>=2.0.0->tensorflow) (3.1.1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in ./.local/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow) (1.0.2)
Requirement already satisfied: h5py in ./.local/lib/python2.7/site-packages (from keras-applications>=1.0.8->tensorflow) (2.10.0)
Installing collected packages: tensorflow
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/tensorflow-2.0.0.dist-info'
Consider using the `--user` option or check the permissions.

弃用:Python 2.7将于2020年1月1日结束其生命周期。请升级您的Python,因为Python 2.7将在该日期后不再维护。pip的未来版本将放弃对Python2.7的支持。有关pip中Python 2支持的更多详细信息,请访问https://pip.pypa.io/en/latest/development/release-process/#python-2-支持
收集张量流
使用缓存https://files.pythonhosted.org/packages/17/08/1ff15637a03b1565dd6cb0916b3ca6873db3a1fc69be0ed851be936e5633/tensorflow-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
已满足要求:gast==0.2.2 in./.local/lib/python2.7/site-packages(来自tensorflow)(0.2.2)
已满足要求:grpcio>=1.8.6 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.24.1)
已满足要求:numpy=1.16.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.16.5)
已满足要求:后端口。weakref>=1.0rc1;python_版本=1.11.1 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.11.2)
已满足要求:protobuf>=3.6.1 in./.local/lib/python2.7/site-packages(来自tensorflow)(3.10.0)
已满足要求:keras预处理>=1.0.5 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.1.0)
已满足要求:模拟>=2.0.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(3.0.5)
已满足要求:keras应用>=1.0.8 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.0.8)
已满足要求:轮入/usr/lib/python2.7/dist-packages(来自tensorflow)(0.30.0)
已满足要求:functools32>=3.2.3 in./.local/lib/python2.7/site-packages(来自tensorflow)(3.2.3.post2)
已满足要求:六个>=1.10.0 in/usr/lib/python2.7/dist-packages(来自tensorflow)(1.11.0)
已满足要求:absl py>=0.7.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(0.8.1)
已满足要求:opt einsum>=2.3.2 in./.local/lib/python2.7/site-packages(来自tensorflow)(2.3.2)
已满足要求:termcolor>=1.1.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(1.1.0)
已满足要求:谷歌面食>=0.1.6英寸/.local/lib/python2.7/site-packages(来自tensorflow)(0.1.7)
已满足要求:enum34>=1.1.6;/usr/lib/python2.7/dist-packages中的python_版本<“3.4”(来自tensorflow)(1.1.6)
已满足要求:tensorflow估计器=2.0.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(2.0.0)
已满足要求:astor>=0.6.0 in./.local/lib/python2.7/site-packages(来自tensorflow)(0.8.0)
已满足的要求:期货>=2.2.0;.local/lib/python2.7/site-packages中的python_版本<“3.2”(来自grpcio>=1.8.6->tensorflow)(3.3.0)
已满足要求:setuptools>=41.0.0 in./.local/lib/python2.7/site-packages(来自tensorboard=2.0.0->tensorflow)(41.4.0)
已满足要求:werkzeug>=0.11.15 in./.local/lib/python2.7/site-packages(从tensorboard=2.0.0->tensorflow)(0.16.0)
已满足要求:降价>=2.6.8 in./.local/lib/python2.7/site-packages(从tensorboard=2.0.0->tensorflow)(3.1.1)
已满足要求:funcsigs>=1;python_版本=2.0.0->tensorflow)(1.0.2)
已满足要求:h5py in./.local/lib/python2.7/site-packages(来自keras应用>=1.0.8->tensorflow)(2.10.0)
安装收集的软件包:tensorflow
错误:由于环境错误,无法安装程序包:[Errno 13]权限被拒绝:'/usr/local/lib/python2.7/dist-packages/tensorflow-2.0.0.dist-info'
考虑使用“-Upple”选项或检查权限。

看起来像是访问问题。您使用的是哪个平台,是Ubuntu、Windows、MacOS等


我想是MacOS或者Ubuntu,尝试使用
sudo pip install tensorflow

您能添加一个您使用的pip命令吗?@Faran2007 pip install tensorflow full traceback?我想有一些文件可以运行与python 2.7对应的scipy和tensorflow。您能给我完整的回溯吗?我正在使用的UbuntuIt正在给出错误
回溯(最后一次调用):文件“/usr/bin/pip”,第9行,在from-pip-import-main-ImportError:无法导入name-main
好的,那么它看起来像是
pip的问题,请按照问题中的此命令操作。