chuanconggao/PrefixSpan-py

Installation problem

kuroshiba-Ginji opened this issue · 4 comments

Hello!
I'm interested in your project and trying to install using pip.
However, I get this error and cannot proceed.

pip3 install -U prefixspan
Collecting prefixspan
Using cached https://files.pythonhosted.org/packages/53/8d/f48a549b96f63234e0ff446be390cb8c915d7596401764ca76a0ff508a86/prefixspan-0.5.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-vgkdsun3/prefixspan/setup.py", line 18
download_url=f"{url}/tarball/{version}",
^
SyntaxError: invalid syntax
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vgkdsun3/prefixspan/
`

is there any way to solve this?
Thank you in advance!

It seems your Python version is lower than 3.6. As the error is caused by the f-string, introduced in Python 3.6.

I tweaked the setup.py to support lower version of Python 3.

I have pushed a newer version of 0.5.1.1 to PyPI. Please have a test with that one.

Thank you for your quick reply!
I guess I'll update my python version to 3.6.

The similar problem seems to be there still.

▶ sudo pip3 install -U prefixspan
The directory '/home/akshay/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/akshay/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting prefixspan
  Downloading https://files.pythonhosted.org/packages/c5/b0/e66e9f6e07a0b37aa0f5703c46f54bafbdf65dfba63994247676b19076c4/prefixspan-0.5.2.tar.gz
Collecting docopt>=0.6.2 (from prefixspan)
  Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting extratools>=0.8.1 (from prefixspan)
  Downloading https://files.pythonhosted.org/packages/60/76/e0184ff4581ee592a24e888cce3d7f08c09326fb074172e9085b0bca787d/extratools-0.8.1.tar.gz
Collecting RegexOrder>=0.2 (from extratools>=0.8.1->prefixspan)
  Downloading https://files.pythonhosted.org/packages/31/2e/ba45fe736713c4673e59ddb9f27f0f72cf83ff0bf2108b8f4b8df93df3d2/RegexOrder-0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sm5nuhwy/RegexOrder/setup.py", line 17
        download_url=f"{url}/tarball/{version}",
                                              ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-sm5nuhwy/RegexOrder/

@AkshaY2039 Please have a try with Python 3.6. Older versions have this issue.