Installing Flask-SocketIO For Python 2.7

It may seem as a very simple thing if you search the internet for it, but it's not. Here I like to discuss about a problem that can occur with some python plugins.

As mentioned in the most of the places to install this plugin, a developer can use the simple command, "pip install flask-socketio" after installing pip into your computer. But it won't be a good day scenario every time.

While installing this plugin there is a problem that can occur. When installing this "flask-socketio", there is another dependent plugin that is installed, which is 'gevent'. And both these plugins use Visual Studio 2008, VC (Visual C) compiler to compile those plugins at installation. So if that version doesn't exist in the computer there will be a error as "Unable to find vcvarsall.bat" while installing that plugin.

One solution for this problem is available if there is another higher version of Visual Studio is installed in your computer. In there you have to do is misleading the python interpreter to use the current VC compiler available in the version installed in the computer to compile that python plugin.
To do that you can do some changes to your Environment Variable accordingly.

In command Prompt,

If you have Visual Studio 2010 installed, execute
SET VS90COMNTOOLS=%VS100COMNTOOLS%

or with Visual Studio 2012 installed (Visual Studio Version 11)
SET VS90COMNTOOLS=%VS110COMNTOOLS%

or with Visual Studio 2013 installed (Visual Studio Version 12)
SET VS90COMNTOOLS=%VS120COMNTOOLS% 

That sets the related Environment Variable value to act as Visual Studio 2008 is installed in your computer. Not only for gevent, this can be a good solution for most of the plugins when the addressed problem is raised.

But what I went through is a different experience. I tried this solution but it didn't work for me. Then I tried installing Visual Studio 2008 after uninstalling all the other Visual Studio versions I had. Still I couldn't overcome that problem. And in my project, using a web-socket was needed according to client's requirement. So finally I came up with a solution to install gevent plugin to my computer. It is finding a binary version of that particular plugin and installing it.

This particular link is consisted of many binary files related to many python plugins. There few versions of gevent plugins are also available and you can choose the version that matches your hardware platform. After downloading that file, you just have to run it and install it to your computer. This solution worked for me. But to get to that solution I had to do lot of searching and have to spend lot of time for that. That's why I thought of making this post to help someone to save his time when he comes up with this problem. Hope this post saved bit of your time. Comments are welcome.

Comments

  1. Installing Flask-Socketio For Python 2.7 >>>>> Download Now

    >>>>> Download Full

    Installing Flask-Socketio For Python 2.7 >>>>> Download LINK

    >>>>> Download Now

    Installing Flask-Socketio For Python 2.7 >>>>> Download Full

    >>>>> Download LINK 6s

    ReplyDelete

Post a Comment

Popular posts from this blog

WPF Dispatcher - Accessing UI Thread From Another Thread

Downgrade NuGet Packages - Visual Studio

Callbacks With Interfaces Or Delegates