[英]Cross platform application with Qt and Anaconda
By Qt I can develop cross platform applications. 通过Qt,我可以开发跨平台应用程序。 But If I use Anaconda in my Qt application, will my application still be cross platform?
但是,如果我在Qt应用程序中使用Anaconda,我的应用程序是否仍将是跨平台的?
Anaconda is powered by Python, so it must be dependent upon Python interpreter. Anaconda由Python驱动,因此它必须依赖于Python解释器。 Does this dependency on Python interpreter have any effect on being cross platform?
对Python解释器的这种依赖对跨平台有影响吗?
Did anybody develop cross platform applications with Qt and Anaconda? 是否有人用Qt和Anaconda开发跨平台应用程序? Any points which can be shared?
任何可以共享的积分?
I have an application already developed with Qt, QML and C++. 我已经使用Qt,QML和C ++开发了一个应用程序。 I need Anaconda for adding some math-heavy features.
我需要Anaconda添加一些数学运算的功能。
Anaconda is a Python distribution , and it comes with Conda , a package manager for various tools and libraries. Anaconda是Python发行版 ,它随附Conda ,它是各种工具和库的软件包管理器。
Basically Conda manages environments , each one containing its own Python and its own set of libraries and tools, on top of the operating system of a Windows, Mac OS or Linux computer. 基本上,Conda管理环境 ,每个环境都在Windows,Mac OS或Linux计算机的操作系统之上包含自己的Python以及自己的库和工具集。
So, it is fine to develop cross platform applications with Qt and Anaconda : you just need to make sure your dependencies are available for all OSes (go to Anaconda cloud website and check before anything else: search for the library/tool you need, and see if it is available for your target platforms). 因此, 使用Qt和Anaconda开发跨平台应用程序是很好的 :您只需要确保您的依赖项可用于所有操作系统(请访问Anaconda云网站并进行其他检查:搜索所需的库/工具,以及查看它是否可用于您的目标平台)。
In case of Qt, we can see version 5.9.7 is available in the default anaconda
channel and it is available for those platforms: 在Qt的情况下,我们可以看到默认的
anaconda
频道提供了5.9.7版,并且适用于那些平台:
In order to distribute your application, people will need to have Conda installed first. 为了分发您的应用程序,人们需要首先安装Conda。 Then, if you make a Conda package of your software, installing it will be as easy as doing:
然后,如果您制作了软件的Conda软件包,则安装和安装一样容易:
conda create --name my_env
conda activate my_env
conda install -c my_conda_channel install my_package_name
Your code does not need to be written in Python. 您的代码不需要用Python编写。 It is fine to have it written in C++ for example.
例如,可以用C ++编写它。 It makes things more difficult, though.
但是,这使事情变得更加困难。 In this case, you will need to install a compiler to be able to build your software.
在这种情况下,您将需要安装编译器才能构建软件。 There are Conda packages for Linux and OSX compilers.
有适用于Linux和OSX编译器的Conda软件包。 For Windows read more here
对于Windows,请点击此处了解更多
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.