Code reviewboard Installation Problems in Windows

Source: Internet
Author: User

After comparing several code review tools, we decided to deploy a reviewboard. Python-based environment configuration in Windows is quite troublesome. After each step is completed according to the document, the site is still inaccessible. View Apache logs and find the following logs:File "C: \ python27 \ Lib \ Site-packages \ django-1.3.1-py2.7.egg \ Django \ core \ handlers \ wsgi. py", Line 250,In_ Call __, Referer:
Self. load_middleware (), Referer:
File "C: \ python27 \ Lib \ Site-packages \ django-1.3.1-py2.7.egg \ Django \ core \ handlers \ base. py", line 47,InLoad_middleware, Referer: Raise exceptions. improperlyconfigured ('ErrorImporting Middleware%S: "% s "'%(Mw_module, E), Referer: improperlyconfigured:ErrorImporting middleware reviewboard. admin. Middleware: "cannot import name random ",

After Google is searched, a foreigner prompts that the pycrypto package has a problem and needs to be re-compiled in windows. The source code of pycrypto2.5 is downloaded. Compiling in Windows requires the mingw environment. Download mingw and install the C compiler. Remember to check msys. After installation, go to the pycrypto source code directory and execute:

Python setup. py build-C mingw32
The error message is as follows:
Traceback (most recent call last ):
File "setup. py", line 452, In <Module>
Core. Setup (** kW)
File "C: \ python27 \ Lib \ distutils \ core. py", line 152, In Setup
Dist. run_commands ()
File "C: \ python27 \ Lib \ distutils \ Dist. py", line 953, In Run_commands
Self. run_command (CMD)
File "C: \ python27 \ Lib \ distutils \ Dist. py", line 972, In Run_command
Pai_obj. Run ()
File "C: \ python27 \ Lib \ distutils \ command \ build. py", line 127, In Run
Self. run_command (partition _name)
File "C: \ python27 \ Lib \ distutils \ cmd. py", line 326, In Run_command
Self. Distribution. run_command (command)
File "C: \ python27 \ Lib \ distutils \ Dist. py", line 972, In Run_command
Pai_obj. Run ()
File "setup. py", line 247, In Run
Self. run_command (partition _name)
File "C: \ python27 \ Lib \ distutils \ cmd. py", line 326, In Run_command
Self. Distribution. run_command (command)
File "C: \ python27 \ Lib \ distutils \ Dist. py", line 972, In Run_command
Pai_obj. Run ()
File "setup. py", line 269, In Run
Raise runtimeerror ("chmod error ")
Runtimeerror: chmod Error

 
 
After Google again, someone prompts you to install ActivePerl. Remember to configure environment variables and put the ActivePerl path before mingw.
 
Run again
Python setup. py build-C mingw32python setup. py bdist_wininst
After the installation, generate pycrypto-2.5.win32-py2.7.exe and visit the reviewboard website. The problem persists. When I was about to give up, I suddenly saw someone saying there was a problem with pycrypto2.5. Try it with a lower version. So I wrote a 2.2 source code and re-compiled it. An error is reported when Python setup. py bdist_wininst is executed. Error: UnableFindVcvarsall. bat

Solution: Find the distutils. cfg file in the Lib \ distutils directory of Python (if not, create one ). Add the following content:[Build]
Compiler = mingw32

Run Python setup. py bdist_wininstbuildsuccessfully again. The Installation File ". pycrypto-2.2.win32-py2.7.exe" is generated under the bdistdirectory. Delete the previous version 2.5 and then install the version 2.2. Webpage access: It is running properly. Another problem with CSS is the path configuration. When I create a site, I use alias to point to the site. I need to find the settings_local.py file in the conf directory of the RB site and add the alias name after force_script_name,

Force_script_name = "/Review /"
In this way, access again. OK! There are still some minor problems, at least all of which are site configuration problems. Please change them slowly. Later I will write some usage experience.

 

For your convenience, I will release the compiled installation package. (Python 2.7)

Pycrypto2.2 installation package

There are two additional links: Installation materials? Id = 2490 released through wiz
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.