Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The practical application scheme of Python environment and how to write the code

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail the practical application scheme of the Python environment and how to write the code. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Download Python source code to decompress, compile and install, no special operation is required.

Install sh setuptools-0.6c11-py2.6.egg install related Packages

Easy_install DBUtils easy_install flup easy_install web.py

Install mysql-pythonmysql-python package cannot be installed with easy_install, specify the path of mysql_config, note that it is the path of newly installed mysql

Mysql_config=/usr/local/mysql/bin/mysql_config

Compile, install

Python setup.py build python setup.py install

Declare the libmysqlclient path

Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib

3. Install server environment download install fastcgi header file extract, default compilation installation download install PCRE decompression, default compilation installation download lighttpdconfigure download specify-prefix=/usr/local/lighttpd compilation, installation

4. Configuration

For lighttpd fastcgi to run web.py programs, please refer to some very important notes: python scripts run through fastcgi must have executable permissions.

Chmod upright x web/main.py

Restarting the fastcgi program requires removal of / tmp/fastcgi.socket*

On the practical application of the Python environment and how to write the code to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report