Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install new regex module with setup.py

I'm trying to install the new Regex module

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

I type in python setup.py install and get back /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

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.

like image 281
O.rka Avatar asked Oct 14 '25 07:10

O.rka


2 Answers

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

If you have pip installed, you can avoid these manual steps by running “pip install regex”.

like image 79
merwok Avatar answered Oct 17 '25 18:10

merwok


It's Easy (On Mac):

  1. Install easy_install curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
  2. Install pip sudo easy_install pip
  3. Install regex module pip install regex
like image 42
Pavan Avatar answered Oct 17 '25 19:10

Pavan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!