Download the installation package: Http://sourceforge.net/projects/mysql-python then unzip.Switch to directory executionPython setup.py InstallError:Environmenterror:mysql_config not foundWorkaround: Locate the Site.cfg file in the installation package and#mysql_config =/usr/local/bin/mysql_configModified to:Mysql_config =/usr/local/mysql/bin/mysql_configGo onPython setup.py InstallAfter installation, enter Python
The way of thinking is mainly based on this article, linking:Http://www.jb51.net/article/78667.htmBut when the installation of brew, it may be the problem of the site, has been an errorSo looking for information from the Internet, brew installation needs a new window, non-root developmentSpecific methods refer to connection: http://jingyan.baidu.com/article/335530da8b2b0419cb41c338.htmlThe command line is as follows:
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/m
character Def Genpass (n=16): "" "generates a random password, the default length is 16 characters" "" passwd = List ( ) for I in Range (n): passwd + = Random.choice (alnums) return '. Join (passwd) def write_to_clipboard (output): "" Copies the output content to the Clipboard "" Process = subprocess. Popen (' pbcopy ', env={' LANG ': ' en_US. UTF-8 '}, stdin=subprocess. PIPE) process.communicate (Output.encode (' Utf-8 ')) def main (): If Len (sys.argv) = = 1:PASSWD = Genpass ()
Because Mac OS is a UNIX-like system, the basic and Linux system use is not very different, but the user log on automatically execute the environment variable file differencesMac System:VI ~/.bash_profileLinux systems:ls -A. bash*. bash_history. bash_logout. bash_profile . BASHRCThere are BASH_PROFILE,BASHRC in Linux, the following are the differences:
/etc/profile: This file sets the environment information for each user of the system, and t
Create a new ~/.pythonstartup file and write the following:$ cat ~/.pythonstartup Import sysimport readlineimport rlcompleterif sys.platform = = ' Darwin ' and sys.version_info[0] = = 2 : Readline.parse_and_bind ("Bind ^i Rl_complete") else:readline.parse_and_bind ("Tab:complete")Then set the environment variable Pythonstartup, can be set in the ~/.bash_profile file of the home directory, append the following line. As follows:Export pythonstartup= $HOME/.pythonstartupReload the ~/.bash_profile c
. DS_Store is a hidden file created by Apple's Mac OS X operating system. It stores custom properties of folders, for example, you can select the icon position or background color of a file. -- See Wikipedia
Sometimes ,. DS_Store is especially troublesome, such as compressing files or using version control software such as svn and git, so a piece of code is written for Recursive deletion. DS_Store file. The younger brother is the first programmer. The
First, download the relevant Chinese font Simhei file:Second, find the Matplotlib data storage location by the following code:Import matplotlib Print (Matplotlib.matplotlib_fname ())My directory is: /VOLUMES/05/ANCONDA/ANACONDA3/LIB/PYTHON3.6/SITE-PACKAGES/MATPLOTLIB/MPL-DATA/MATPLOTLIBRCThird, open the above directory, and copy the downloaded font file simhei.ttf to the fonts/ttf/ Directory of the above directoryFour, in the above directory with sublime open MATPLOTLIBRC, find #font. Sans-s
The development platform is a Mac and needs to use the Python image processing library pil, which records the installation process as well as the problems that arise.The basic installation process is this, using the command pip for installation
The code is as follows
Copy Code
$ pip Install PiLDownloading/unpacking pilCould not find no downloads that satisfy the requirement PILS
Label:one. Install Python 1) Check install or not Enter the command on the Mac Terminal: which python to see the path to Python 2) When not installed, manually download the installation package address: https://www.python.org/downloads/ Select Download Mac OS X 64-bit/32-bit
I recently had a project that uses Python to develop a COM build under Win32, one of which is to get the MAC address of the local computer. The requirements are simple, although I'm new to Python, but I'm still using search engines. Baidu, found that most of the introduction using the import UUID to get the MAC address
Reference: http://blog.csdn.net/wirelessqa/article/details/232617231th Step: Download Python3.4As follows:DownloadInstalling the downloaded DMG file3rd Step: Configure#!/bin/The Bash#python version needs to be modified in two places #1. new_version#sudo-I #得到超级权限new_version="3.4"Pypath=/system/library/frameworks/python.framework/versions/"$new _version"#第1步移动新版python到ma
1. First implement the command line to run MySQLThis part of the internet has a big God said already very clear, directly quoted, Doseha. Reference: http://www.lihui.info/mac-pydev-mysqldb/ Install MYSQLDB on Mac OS, have a lot of problems, summarize:First, if the use of sudo easy_install mysql-python command installation, basically will not succeed, for two r
System environment: MAC OSX 10.9.2Python version: 2.7.5The new beginning of the RMBP, with the Python environment, but put it into the production environment, there are various problems, first of all, the most deadly, is the installation module problems, resulting in the development has not been normal, the following is my installation of the Python module, the a
Problem Description:
Mac system, using the sudo command to upgrade the Python six module, a operation not permitted error message appears
Error Location:
Http://stackoverflow.com/questions/29485741/unable-to-upgrade-python-six-package-in-mac-osx-10-10-2
Http://www.jianshu.com/p/e90fb15684fa
Summary: Th
Initially wanted to use wingide for Python development learning, but wingide needed a fee. So on-line search the next wingide crack method, through the anti-compilation Python method to crack, results mac under the latest version of the Wingide cracked failure, had to find another way.Before learning HTML to see Sublimetext, but then directly using the
Since virtualenv can not only isolate the Python version, it can also isolate different versions of the plug-in module and choose the Virtualenv+virtualenvwrapp combination based on the development scenario. First, install VIRTUALENV1, Mac Pro system comes with Python 2.7.102, manually install Python 3.5.43, install p
System: OS X 10.11.6
The MAC system has its own Python2.7, using the Easy_install command with its own system to install the modules online. If you need to use the PYTHON3 environment, python3.5 is invoked at the terminal input Python3 after installing the Python3.5.1, view Python version
Python
2, install NumPyNumPy is a
Reinstall Easy_install (Setuptools)1, to download Https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2, to the terminal to perform sudo sh setuptools-0.6c11-py2.7.egg
3, clear the download Setuptools-0.6c11-py2.7.egg
Remove MySQLsudo rm/usr/local/mysqlsudo rm-rf/usr/local/mysql*sudo rm-rf/library/startupitems/mysqlcomsudo rm-rf/library/preferencepanes/mysql*Vim/etc/hostconfig and removed the line mysqlcom=-yes-RM-RF ~/library/preferencepanes/mysql*sudo rm-rf/library
Label:The following problem occurs when you install Python MySQL on a Mac computer today:The installation is using sudo pip install Mysql-python to install the MySQL module with no problem, but when importing mysqldb in PythonTraceback (most recent):File "File "mysqldb/__init__.py", line A, in Import _mysqlImporterror:dlopen (./_mysql.so, 2): no suitable image fo
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.