Skip to content

Commit 9ce4fac

Browse files
committed
[09/30/2022] 在Windows下增加qt和qt环境变量使能matplotlib-cpp
在Windows下增加qt和qt环境变量使能matplotlib-cpp
1 parent 0dbf276 commit 9ce4fac

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ It is built to resemble the plotting API used by Matlab and matplotlib.
99
### Windows
1010

1111
```bash
12+
conda install qt
1213
mkdir build
1314
cd build
1415
cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=..\dist

matplotlib.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ static bool __XXX_YYY_ZZZ_INIT__() {
6868
const std::string PYTHONPATH = PYTHONHOME + ";" + PYTHONHOME +
6969
R"(\site-packages;)" + CONDA_PREFIX +
7070
R"(\DLLs)";
71+
const std::string QT_QPA_PLATFORM_PLUGIN_PATH =
72+
CONDA_PREFIX + R"(\Library\plugins\platforms)";
7173
_putenv_s("PYTHONHOME", PYTHONHOME.c_str());
7274
_putenv_s("PYTHONPATH", PYTHONPATH.c_str());
75+
_putenv_s("QT_QPA_PLATFORM_PLUGIN_PATH",
76+
QT_QPA_PLATFORM_PLUGIN_PATH.c_str());
7377
#else
7478
const std::string PYTHONHOME =
7579
CONDA_PREFIX + "/lib/python" + PYTHON_VERSION;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy