简体   繁体   English

如何在python pycharm中安装zmq并修复错误

[英]how can I install zmq in python pycharm and fix the error

I am new to Python and Pycharm and in my project (Python 2.7) I am trying to launch some code which uses zmq as a dependency. 我是Python和Pycharm的新手,在我的项目中(Python 2.7)我试图启动一些使用zmq作为依赖的代码。 I installed zmq through package manager and added manually some paths to env. 我通过包管理器安装了zmq并手动添加了一些到env的路径。 Currently it looks like the following: 目前它看起来如下:

环境中的路径

But when I run the script in fails with the following message: from . 但是当我运行脚本失败时出现以下消息:from。 import (constants, error, message, context, ImportError: DLL load failed: Не найден указанный модуль. import(常量,错误,消息,上下文,ImportError:DLL加载失败:Ненайденуказанныймодуль。

So it looks like this: 所以它看起来像这样:

追溯

so basically it is the first line of code which generates this error: 所以基本上它是生成此错误的第一行代码:

import os, sys, time, signal, zmq

Any ideas how to fix it would be welcome. 任何想法如何解决它将是受欢迎的。 Thank you 谢谢

I suppose I have Cython as when I try to install it I see the following: 我想我有Cython,因为当我尝试安装它时,我看到以下内容:

cmd输出

pyzmq is also present: pyzmq也存在:

pyzmq

issue solved. 问题解决了。

just installed pure Python 2.7 interpreter from https://www.python.org/ and added it as an interpreter in PyCharm, Also installed protobuf and pyzmq there and it worked. 刚刚从https://www.python.org/安装了纯Python 2.7解释器并将其作为解释器添加到PyCharm中,还在那里安装了protobuf和pyzmq并且它工作正常。 I think it was an Anaconda issue, although I removed zmq module from there leaving only pyzmq. 我认为这是一个Anaconda问题,虽然我从那里删除zmq模块只留下pyzmq。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM