我有一些我从Go程序中读取的文本文件.我想发送一个可执行文件,而不另外提供该文本文件.如何将其嵌入到Windows和Linux的编译中?
我正在尝试使用以下命令使用tensorflow(GPU)版本1.4.1创建一个新的conda环境conda create -n parsim_1.4.1 python=3 tensorflow-gpu=1.4.1。
然而,它打印出一个奇怪的冲突:
$ conda create -n parsim_1.4.1 python=3 tensorflow-gpu=1.4.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package python …Run Code Online (Sandbox Code Playgroud) 我希望用户能够使用位置或可选参数将强制参数传递给“argparse”。
即,以下两种形式都有效:
my_prog arg
my_prog -m arg
Run Code Online (Sandbox Code Playgroud)
但是那里的建议使这两种形式都是可选的。我希望其中之一是强制性的。
当然,我可以在解析其中至少一个已设置后添加手动检查。但我有一种预感,一定有更好的解决方案。
(即使使用我的手动方法,“帮助”部分也将它们都显示为可选)