如何从控制台扭曲运行? [英] How do I run twisted from the console?

查看:96
本文介绍了如何从控制台扭曲运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上将Python 3与Anaconda一起使用.我安装了conda install twisted的Twisted,现在尝试从控制台运行twisted(或twistd?),但出现此错误

I'm using Python 3 with Anaconda on Windows 7. I installed Twisted with conda install twisted, and now I'm trying to run twisted (or twistd?) from the console, but I get this error

扭曲"不被识别为内部或外部命令,可操作程序或批处理文件.

'twisted' is not recognized as an internal or external command, operable program or batch file.

这使我认为路径中缺少目录,如此问题. Anaconda安装在C:\Anaconda3中,但是即使在C:\Anaconda3\Lib\site-packages\twisted中也没有twisted.pytwistd.py文件.

which makes me think a directory is missing from the path, as in this question. Anaconda is installed in C:\Anaconda3, but even in C:\Anaconda3\Lib\site-packages\twisted, there isn't a twisted.py or twistd.py file.

我是在做错什么,还是在错误的位置找文件?

Am I doing something wrong, or am I looking in the wrong place for the file(s)?

这是一个问题,因为Twisted还没有正式移植到Python 3吗?

Is this an issue because Twisted isn't officially ported to Python 3 yet?

推荐答案

twistd运行扭曲的应用程序(尽管您可以像其他任何Python文件一样运行带有Twisted代码的脚本),并且应位于bin目录中在Anaconda安装目录中,因此如果可以获取conda,也可以获取twistd.

twistd runs twisted applications (though you can run a script with Twisted code in it like any other Python file) and should be in the bin directory inside your Anaconda installation directory, so if you can get conda, you can get twistd as well.

twisted是用于编写使用Twisted的代码的库,因此无法从命令行运行该库.

twisted is the library you use to write code that uses Twisted, so you can't run that from the command line.

以下是Twisted在Python3上的状态 https://twistedmatrix.com/trac/里程碑/Python-3.x

Here is the status of Twisted on Python3 https://twistedmatrix.com/trac/milestone/Python-3.x

这是关于Twisted的特定故障单,尚未在Python3上提供 https://twistedmatrix.com/trac/ticket/7497

And here is the particular ticket about twistd not being available on Python3 yet https://twistedmatrix.com/trac/ticket/7497

这篇关于如何从控制台扭曲运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆