V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
zhoudaiyu
V2EX  ›  Python

用 C++调用 Python 出 R6034 的错误

  •  
  •   zhoudaiyu · 2017-09-14 10:36:42 +08:00 · 2404 次点击
    这是一个创建于 2415 天前的主题,其中的信息可能已经有所发展或是发生改变。

    单独执行 python 脚本是没问题的,然后现在想用 C++调用 Python,然后运行的时候出现了错误“ An application has made an attempt to load the C runtime library incorrectly. Please contact the application ‘ s support team for more information ”。但是程序还能跑起来,结果也正常。请问大家这是什么鬼?环境是 VS2015+Anaconda 的 python 2.7

    3 条回复    2017-09-14 19:50:21 +08:00
    Wicked
        1
    Wicked  
       2017-09-14 12:38:07 +08:00 via iPhone
    编译用的 python lib 跟 runtime 的不一致
    zhoudaiyu
        2
    zhoudaiyu  
    OP
       2017-09-14 18:56:11 +08:00
    @Wicked 我用的 python27.lib 是 Anaconda 自带的,但是我不知道运行时的 python lib 版本,请问如何解决呢?
    gnaggnoyil
        3
    gnaggnoyil  
       2017-09-14 19:50:21 +08:00
    @zhoudaiyu 你跑一下 python interpreter 会看到这个 CPython 构建时所使用的 MSC 版本,对着 MSC 版本找对应的 Visual Studio 即可
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1098 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:39 · PVG 06:39 · LAX 15:39 · JFK 18:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.