Tag Archives: python

Solution: PIP install MySQL Python has the following problems

Question 1:
Error: Microsoft Visual C++ 9.0 is required
Install mysql-Python with PIP on Windows with the following error message and see http://aka.ms/vcPython27 for a solution
Error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
Open the http://aka.ms/vcpython27 will jump to http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
Download the installation package
Microsoft Visual C++ Compiler for Python 2.7
solves the problem after installation
Problem 2:
Resolve ‘C:\ Users\\Administrator\\AppData\\Local\\ Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\ Cl.exe ‘failed with exit 2

Error: Cannot open include file: ‘config-win.h’: No such file or Directory

Problem description:
pip instal MySQL-python
The following error occurs:

Operating environment:
Python 2.7.14
Setuptools 16.0
PIP 7.0.1
Operating system: Windows7.0.10240 64-bit

Solutions:
1) Install the mysql Connector. Install the 32-bit or 64-bit version of the system at the following download address:
http://dev.mysql.com/downloads/connector/c/6.0.html#downloads
2) install Microsoft Visual C++ Compiler for Python 2.7. If the installation of mysql-python requires even some vc runtime, the download address is:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
(refer to the previous blog: http://blog.csdn.net/xxm524/article/details/47360229)
Once the dependency software is installed as described above, running PIP Install mysql-Python again should succeed;
However, I encountered this problem again. After a careful look at the error message, I found the following prompts:

** Note * : If ‘C:\ Users\\Administrator\\AppData\\ Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\ cl.Exe ‘failed with exit 2 still appears, maybe the version you installed is different from your Python and PIP version, maybe Python is 32 bits, You have a 64-bit Connector installed
The mysql Connector installed was 64-bit and was installed in the Directory C:\Program Files \ mysql \ mysql Connector C 6.0.2. However, from the prompt I see that it wants to install to C:\Program Files (x86)\ mysql \ mysql Connector C 6.0.2, so a 32-bit mysql connector should be installed.


Reinstall the 32-bit mysql Connector, re-run PIP Install mysql-Python, and the installation was successful!
In summary, the main reason for this is that python and PIP are both 32-bits installed on the system.
Reference article:
http://www.cnblogs.com/yuguoguo/p/4089427.html
http://blog.csdn.net/xxm524/article/details/47360229

Error parsing XML: error after document element

Many developers may be warning about errors like Error parsing XML: junk after document element, where Android123 hints that usually legal XML files have only one parsing node, such as the parsing node

< android123>
& lt; item1/>
& lt; item2/>
& lt; item3/>
< /android123>
If you make a mistake like an Error parsing XML: junk after document element, your focus may be to have multiple nodes at the root, such as Parsing XML
& lt; android123>
& lt; item1/>
< /android123>
< android123>
& lt; item2/>
& lt; item3/>
< /android123>
 
 

XML cannot be parsed, because it may not be written in the correct XML format, considering that the root node is not correct.

From:
the Error parsing XML: junk after the document element such mistakes – CSDN blog
https://blog.csdn.net/sunmoon631/article/details/6438617

# pip install scipy — distutils.errors.LinkError: Command

[root@Dragonwake python]# pip install scipy
You are using pip version 7.1.0, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting scipy
  Using cached https://files.pythonhosted.org/packages/a9/b4/5598a706697d1e2929eaf7fe68898ef4bea76e4950b9efbe1ef396b8813a/scipy-1.2.1.tar.gz
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy
  Complete output from command /usr/local/bin/python2.7 -c "import setuptools;__file__='/tmp/pip-build-5bcAZx/scipy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmptS4PsQpip-wheel-:
  Running from scipy source directory.
  lapack_opt_info:
  lapack_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE
  
  openblas_lapack_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE
  
  openblas_clapack_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas,lapack not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE
  
  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE
  
  atlas_3_10_info:
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE
  
  atlas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE
  
  atlas_info:
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/local/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib64/sse2
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib64
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE
  
  accelerate_info:
    NOT AVAILABLE
  
  /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:638: UserWarning:
      Atlas (http://math-atlas.sourceforge.net/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [atlas]) or by setting
      the ATLAS environment variable.
    self.calc_info()
  lapack_info:
  customize UnixCCompiler
  customize UnixCCompiler
    FOUND:
      libraries = ['lapack', 'lapack']
      library_dirs = ['/usr/lib64']
      language = f77
  
  blas_info:
  customize UnixCCompiler
  customize UnixCCompiler
  C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
  
  creating /tmp/tmp_D3_qJ/tmp
  creating /tmp/tmp_D3_qJ/tmp/tmp_D3_qJ
  compile options: '-I/usr/local/include -I/usr/include -c'
  gcc: /tmp/tmp_D3_qJ/source.c
  /tmp/tmp_D3_qJ/source.c:1:19: warning: cblas.h: No such file or directory
  /tmp/tmp_D3_qJ/source.c: In function ‘main’:
  /tmp/tmp_D3_qJ/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
  gcc -pthread /tmp/tmp_D3_qJ/tmp/tmp_D3_qJ/source.o -L/usr/lib64 -lcblas -o /tmp/tmp_D3_qJ/a.out
  /usr/bin/ld: cannot find -lcblas
  collect2: ld returned 1 exit status
  gcc -pthread /tmp/tmp_D3_qJ/tmp/tmp_D3_qJ/source.o -L/usr/lib64 -lblas -o /tmp/tmp_D3_qJ/a.out
  /tmp/tmp_D3_qJ/tmp/tmp_D3_qJ/source.o: In function `main':
  /tmp/tmp_D3_qJ/source.c:6: undefined reference to `cblas_ddot'
  collect2: ld returned 1 exit status
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 492, in <module>
      setup_package()
    File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 488, in setup_package
      setup(**metadata)
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 137, in setup
      config = configuration()
    File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 388, in configuration
      lapack_opt = get_info('lapack_opt')
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 445, in get_info
      return cl().get_info(notfound_action)
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 638, in get_info
      self.calc_info()
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1604, in calc_info
      blas_info = get_info('blas')
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 445, in get_info
      return cl().get_info(notfound_action)
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 638, in get_info
      self.calc_info()
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1699, in calc_info
      lib = self.has_cblas(info)
    File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1742, in has_cblas
      extra_postargs=info.get('extra_link_args', []))
    File "/usr/local/lib/python2.7/distutils/ccompiler.py", line 700, in link_executable
      debug, extra_preargs, extra_postargs, None, target_lang)
    File "/usr/local/lib/python2.7/distutils/unixccompiler.py", line 200, in link
      raise LinkError, msg
  distutils.errors.LinkError: Command "gcc -pthread /tmp/tmp_D3_qJ/tmp/tmp_D3_qJ/source.o -L/usr/lib64 -lblas -o /tmp/tmp_D3_qJ/a.out" failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for scipy
Failed to build scipy
Installing collected packages: scipy
  Running setup.py install for scipy
    Complete output from command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-5bcAZx/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gqE_Ie-record/install-record.txt --single-version-externally-managed --compile:
    Running from scipy source directory.
    
    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:
    
      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)
    
    
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE
    
    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE
    
    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE
    
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE
    
    atlas_3_10_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE
    
    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
    
    atlas_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib64/sse2
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib64
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE
    
    accelerate_info:
      NOT AVAILABLE
    
    /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:638: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      FOUND:
        libraries = ['lapack', 'lapack']
        library_dirs = ['/usr/lib64']
        language = f77
    
    blas_info:
    customize UnixCCompiler
    customize UnixCCompiler
    C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
    
    creating /tmp/tmpzUwJsa/tmp
    creating /tmp/tmpzUwJsa/tmp/tmpzUwJsa
    compile options: '-I/usr/local/include -I/usr/include -c'
    gcc: /tmp/tmpzUwJsa/source.c
    /tmp/tmpzUwJsa/source.c:1:19: warning: cblas.h: No such file or directory
    /tmp/tmpzUwJsa/source.c: In function ‘main’:
    /tmp/tmpzUwJsa/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
    gcc -pthread /tmp/tmpzUwJsa/tmp/tmpzUwJsa/source.o -L/usr/lib64 -lcblas -o /tmp/tmpzUwJsa/a.out
    /usr/bin/ld: cannot find -lcblas
    collect2: ld returned 1 exit status
    gcc -pthread /tmp/tmpzUwJsa/tmp/tmpzUwJsa/source.o -L/usr/lib64 -lblas -o /tmp/tmpzUwJsa/a.out
    /tmp/tmpzUwJsa/tmp/tmpzUwJsa/source.o: In function `main':
    /tmp/tmpzUwJsa/source.c:6: undefined reference to `cblas_ddot'
    collect2: ld returned 1 exit status
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 492, in <module>
        setup_package()
      File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 488, in setup_package
        setup(**metadata)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 137, in setup
        config = configuration()
      File "/tmp/pip-build-5bcAZx/scipy/setup.py", line 388, in configuration
        lapack_opt = get_info('lapack_opt')
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 445, in get_info
        return cl().get_info(notfound_action)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 638, in get_info
        self.calc_info()
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1604, in calc_info
        blas_info = get_info('blas')
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 445, in get_info
        return cl().get_info(notfound_action)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 638, in get_info
        self.calc_info()
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1699, in calc_info
        lib = self.has_cblas(info)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 1742, in has_cblas
        extra_postargs=info.get('extra_link_args', []))
      File "/usr/local/lib/python2.7/distutils/ccompiler.py", line 700, in link_executable
        debug, extra_preargs, extra_postargs, None, target_lang)
      File "/usr/local/lib/python2.7/distutils/unixccompiler.py", line 200, in link
        raise LinkError, msg
    distutils.errors.LinkError: Command "gcc -pthread /tmp/tmpzUwJsa/tmp/tmpzUwJsa/source.o -L/usr/lib64 -lblas -o /tmp/tmpzUwJsa/a.out" failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-5bcAZx/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gqE_Ie-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-5bcAZx/scipy

The following error occurs:

distutils.errors.LinkError: Command "gcc -pthread /tmp/tmp2AUeGJ/tmp/tmp2AUeGJ/source.o -L/usr/lib64 -lblas -o /tmp/tmp2AUeGJ/a.out" failed with exit status 1

Refer to the address: https://stackoverflow.com/questions/53565726/failed-building-wheel-for-numpy-pandas
The installation

sudo yum install atlas-devel


appear pygame.error : font not initialized problem, remember to check whether the program calls pygame.init ()

The pygame.init() function, which must be called after the pygame module is imported and before you start using any of the functions provided by PyGame, you don’t have to know what this function does, just know that in order to work with pyGame functions, you must call it at the beginning. If you run into an error like Pygame.error: font not initialized, check to see if you forgot to call Pygame.init () in front of your program

Solve the problem of pychar import error

Question:
Pycharm shows those classes that cannot be referenced, even if they are in the project.
Analysis:
Pycharm defaults the project’s root directory to the source directory, so if the import USES an absolute path instead of a relative path, it will be looked up in the project’s root directory, not the project’s own root directory.
Methods:
Set the root directory of the item in Pycharm:
The file – & gt; Setting – & gt; Project: server – & gt; project structure
Set the path to Source in the root directory of the project.

com.apple.installer . pagecontroller error – 1 PKG installation error

Downloaded a PKG installation file on the Internet;
An error occured on a dozen installations on a MAC

The reason is that the file is directly downloaded from the Internet, there will be permission problems, need to repair the installation permission of the installation software;
My reason is, downloaded is a RAR MAC decompression can not, online decompression, got PKG installation error
I finally downloaded a MAC under the RAR decompression software
http://www.pc6.com/softview/SoftView_53196.html
Reference: https://discussions.apple.com/thread/2628710

[Python] notimplemented and notimplemented error

NotImplemented is a non-exception object, and NotImplementedError is an exception object.

>>> NotImplemented
NotImplemented
>>> NotImplementedError
<type 'exceptions.NotImplementedError'>


>>> type(NotImplemented)
<type 'NotImplementedType'>
>>> type(NotImplementedError)
<type 'type'>

TypeError is obtained if NotImplemented is thrown, because it is not an exception. Throwing a NotImplementedError will normally catch the exception.

>>> raise NotImplemented

Traceback (most recent call last):
  File "<pyshell#10>", line 1, in <module>
    raise NotImplemented
TypeError: exceptions must be old-style classes or derived from BaseException, not NotImplementedType


>>> raise NotImplementedError

Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    raise NotImplementedError
NotImplementedError

Why is there a NotImplemented and a NotImplementedError?
Sorting a list in Python often USES a comparison operation such as ___ ().
Sometimes Python’s internal algorithms choose another way to determine the comparison result, or simply choose a default result. If an exception is thrown, the sorting operation will be broken. Therefore, it will not be thrown if NotImplemented is used, thus Python can try other methods.
The NotImplemented object sends a signal to the runtime environment to tell it that if the current operation fails, it should check out other feasible methods. For example, in the expression a == b, if a. ___, eq__(b) returns NotImplemented, Python will try B. ___ (a). If the call to the method of B/eq__ can return True or False, the expression is successful. If b.__eq__(a) also fails, Python continues to try other methods, such as using! = to compare.

ref:http://www.cnblogs.com/ifantastic/p/3682268.html

Arithmetical overflow error converting expression to data type datetime

After changing the Sql Server database language, our ContentServer cannot edit the newly created file when using DA. The exception arithmetic overflow error converting to data type datetime cannot be solved by changing the database language again. Today, I found that the ODBC connection configuration has also been changed. So replace it back

If any of the above occurs, see if the language is consistent with the database language.

Reproduced in: https://www.cnblogs.com/yangqianming/archive/2011/07/15/2107445.html