背景:
我正在尝试将 python 脚本转换为可以在其他计算机上使用的可执行文件。我决定使用 PyInstaller。我正在使用Python 2.7.13 / Anaconda 2.2.0 (64-bit)。我当然看过很多例子,我可以通过基本例子来实现这一点。但是,我现在正在处理的脚本使用环境变量。以下代码块出现在我的 python 脚本的开头:
import os
# force qt4
os.environ['ETS_TOOLKIT'] = 'qt4'
os.environ['QT_API'] = 'pyqt'
from traits.api import HasTraits, Range, Instance, Button, on_trait_change, Bool, Str, Enum, Float, Int
from traitsui.api import View, Item, Group, HGroup, spring, Handler, Action, InstanceEditor, Menu, MenuBar, message, \
Tabbed
from mayavi.core.ui.api import MayaviScene, SceneEditor, MlabSceneModel
from pyface.api import FileDialog, OK
import yaml
from mayavi import mlab
import numpy as np
from collections import namedtuple
import …Run Code Online (Sandbox Code Playgroud) 我已经更新了我正在处理的python程序的anaconda包.我现在想要在脱机的计算机上安装这些新包.
我使用以下命令生成了已安装软件包的列表:
>conda list -e > packagelist.txt
Run Code Online (Sandbox Code Playgroud)
我希望能够使用以下内容更新脱机计算机上的软件包:
>conda install --file (location of 'packagelist') --channel file://(location of the folder where the packages are located)
Run Code Online (Sandbox Code Playgroud)
所以我的问题是:如何轻松创建一个文件夹"pkgs",其中包含我的包列表中指示的所有包文件?
我可以简单地使用位于当前Anaconda安装位置的整个"pkgs"文件夹吗?或者我的包列表中的包不一定安装在那里吗?
如果问题是'nooby'我很抱歉,老实说我不知道怎么做.期待任何帮助.