有没有友友知道为什么在tensorflow1的环境下不能install trfl模块,但是在tensorflow2又可以安装。
在tensorflow1的环境下安装就会报错
你把报错复制粘贴出来
Collecting trfl
Using cached trfl-1.2.0-py3-none-any.whl (104 kB)
Requirement already satisfied: numpy in d:\anaconda\anaconda3\envs\tensorflow\lib\site-packages (from trfl) (1.19.5)
Requirement already satisfied: absl-py in d:\anaconda\anaconda3\envs\tensorflow\lib\site-packages (from trfl) (1.4.0)
Requirement already satisfied: wrapt in d:\anaconda\anaconda3\envs\tensorflow\lib\site-packages (from trfl) (1.15.0)
Requirement already satisfied: six in d:\anaconda\anaconda3\envs\tensorflow\lib\site-packages (from trfl) (1.16.0)
Collecting dm-tree
Using cached dm-tree-0.1.8.tar.gz (35 kB)
Building wheels for collected packages: dm-tree
Building wheel for dm-tree (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\Anaconda3\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"'; __file__='"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\15633\AppData\Local\Temp\pip-wheel-6mcynku0'
cwd: C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\
Complete output (55 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\tree
copying tree\sequence.py -> build\lib.win-amd64-3.6\tree
copying tree\tree_benchmark.py -> build\lib.win-amd64-3.6\tree
copying tree\tree_test.py -> build\lib.win-amd64-3.6\tree
copying tree\__init__.py -> build\lib.win-amd64-3.6\tree
running build_ext
Traceback (most recent call last):
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 77, in _check_build_environment
subprocess.check_call(['cmake', '--version'])
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 306, in check_call
retcode = call(*popenargs, **kwargs)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 287, in call
with Popen(*popenargs, **kwargs) as p:
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 155, in <module>
keywords='tree nest flatten',
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 70, in run
self._check_build_environment()
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 82, in _check_build_environment
) from e
RuntimeError: CMake must be installed to build the following extensions: _tree
----------------------------------------
ERROR: Failed building wheel for dm-tree
Running setup.py clean for dm-tree
Failed to build dm-tree
Installing collected packages: dm-tree, trfl
Running setup.py install for dm-tree ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\Anaconda3\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"'; __file__='"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\15633\AppData\Local\Temp\pip-record-y6_fj3zp\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Anaconda\Anaconda3\envs\tensorflow\Include\dm-tree'
cwd: C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\
Complete output (59 lines):
running install
D:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\tree
copying tree\sequence.py -> build\lib.win-amd64-3.6\tree
copying tree\tree_benchmark.py -> build\lib.win-amd64-3.6\tree
copying tree\tree_test.py -> build\lib.win-amd64-3.6\tree
copying tree\__init__.py -> build\lib.win-amd64-3.6\tree
running build_ext
Traceback (most recent call last):
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 77, in _check_build_environment
subprocess.check_call(['cmake', '--version'])
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 306, in check_call
retcode = call(*popenargs, **kwargs)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 287, in call
with Popen(*popenargs, **kwargs) as p:
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 155, in <module>
keywords='tree nest flatten',
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Anaconda\Anaconda3\envs\tensorflow\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 70, in run
self._check_build_environment()
File "C:\Users\15633\AppData\Local\Temp\pip-install-2s9dwpyc\dm-tree\setup.py", line 82, in _check_build_environment
) from e
RuntimeError: CMake must be installed to build the following extensions: _tree
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Anaconda\Anaconda3\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"'; __file__='"'"'C:\\Users\\15633\\AppData\\Local\\Temp\\pip-install-2s9dwpyc\\dm-tree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\15633\AppData\Local\Temp\pip-record-y6_fj3zp\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Anaconda\Anaconda3\envs\tensorflow\Include\dm-tree' Check the logs for full command output.