


Twisted is an event driven network framework.
I recently started to learn about Twisted. First I must install the twisted module.
But when executing under cmd: pip install twisted
, the following problem occurred: "error:Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)
My computer is a pyhton3.4 environment (python2.7 is also available), VC++ 10.0 is not installed, so according to the error prompt, I have to install VC++ 10.0?
But I don’t want to~, so I searched a lot on the Internet and read many other people’s methods. Finally, I heard a sentence while watching the learning video: "The twisted module is lower-level, complex, and has not been fully transplanted to Python3.×"
Okay, anyway. My computer has python2.7, so I will use version 2.7
##Soswitched from python3.4 to python2.7 under the pycharm tool, and successfully installed twisted. Module!!
Problem: import error no module `twisted `
So I started to use the Python2.7 environment when I started to learn about the twisted framework. It prompted when running a small program (need to execute the command under cmd) import error no module `twisted`
#But I have installed the twisted module in Python2.7! And there is no error when running other programs to import twisted!! (A bit Suspicious life~)
So I wonder if it has something to do with operating under cmd? Python2.7 is definitely able to import twisted successfully, but before I imported Python3.4, it was not possible. Successful. So could it be that the cmd command I executed was running under Python3.4?
##Execute the python command and check the python version. Damn it!I have switched to the python2.7 version in pycharm. The 3.4 version should not be displayed!! (A little suspicious of life again~)
## I checked the directory files shown in the two pictures below on my computer:
C:\python34 There is a python.exe and a python3.exe. (There are two .exes, which is very strange.
So when I executed the python command and checked the python version, C:\python34 was called python.exe in the directory instead of python.exe in the C:\python27 directory? ?
So I
delete## in the C:\python34 directoryExecute the command again: python
Oh my god, my guess is right!!
Run a small program again (needs to be under cmd When executing the command), it can run without prompting import error no module `twisted`
Summary: Be careful when installing, please do not rename
The above is the detailed content of Detailed graphic explanation of twisted module installation in python. For more information, please follow other related articles on the PHP Chinese website!

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.