我正在尝试运行一个预训练模型,我需要安装tensorflow 1.1。我成功创建了一个conda环境,并使用命令
安装了tensorflow 1.1pip install tensorflow_gpu==1.1
但它引发了异常
例外:
Traceback (most recent call last):
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/anaconda3/lib/python3.6/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/local/anaconda3/lib/python3.6/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/anaconda3/lib/python3.6/site-packages/protobuf-3.4.0-py3.6-nspkg.pth'
当我尝试测试张量流时,会出现以下错误
import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
我还尝试设置路径,认为它可能会安装在默认的conda而不是所需的环境中 我的路径如下 /home/awahid/.conda/envs/mask-rcnn 但没有用。