使用setup.py安装新的regex模块
我正在尝试安装新的Regex模块
I'm trying to install the new Regex module
readme.txt说::::
The readme.txt says:::
To build and install regex for your default Python run
python setup.py install
To install regex for a specific version run setup.py with that interpreter, e.g.
python3.1 setup.py install
我键入python setup.py install
并返回/Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory
我正在寻找答案,但是人们一直在向我推荐Python文档,这使他们感到困惑.
I'm looking for the answer but people keep referring me to the Python docs and they are confusing.
我知道它真的很简单,但是我不确定为什么它不起作用.
I know it is really simple but I'm just not sure why it isn't working.
这些说明中隐含的第一步是下载regex的tarball或zip文件,将其解压缩,进入该目录,然后运行"python setup". py install".请参见 http://docs.python.org/2/install/index.html#the-new-standard-distutils
The implicit first step in these instructions is to download a tarball or zip file of regex, unpack it, go into that directory, and there run "python setup.py install". See http://docs.python.org/2/install/index.html#the-new-standard-distutils
如果已安装pip,则可以通过运行"pip install regex"来避免这些手动步骤.
If you have pip installed, you can avoid these manual steps by running "pip install regex".