1

I have in my script:

from lineticks import LineTicks
ticks_x = LineTicks(axx, range(0, n, 10), 10, lw=2,
                        label=['{:.2f} s'.format(tt) for tt in t[::10]])

according this web

and I got an error:

ModuleNotFoundError: No module named 'lineticks'

I tried:

pip3 install --user lineticks
Collecting lineticks
  ERROR: Could not find a version that satisfies the requirement lineticks (from versions: none)
ERROR: No matching distribution found for lineticks

EDIT

after advice I tried this

pip install git+https://github.com/xnx/lineticks
Collecting git+https://github.com/xnx/lineticks
  Cloning https://github.com/xnx/lineticks to /tmp/pip-req-build-92fkwp76
  Running command git clone -q https://github.com/xnx/lineticks /tmp/pip-req-build-92fkwp76

Error:

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-92fkwp76/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-92fkwp76/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-req-build-92fkwp76/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/tokenize.py", line 452, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-92fkwp76/setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Moe
  • 301
  • 2
  • 11

1 Answers1

2

Lineticks is not in the Python Package Index (PYPI), so pip doesn't know where to look to find it. This is the cause of the error you are seeing.

Additionally, the lineticks source does not have a setup.py. Therefore, lineticks is not a proper package, and can not be installed with pip.

You'll need to install it manually.

jirassimok
  • 3,850
  • 2
  • 14
  • 23
  • Thank you and what does the error I added to my question mean? – Moe Dec 08 '19 at 05:17
  • 1
    That's because Lineticks is not a real package (it doesn't have a `setup.py`). The answers to the question I linked in my answer should be able to help you. – jirassimok Dec 08 '19 at 05:20
  • 1
    I've updated my answer to make it clearer what the problem is. – jirassimok Dec 08 '19 at 05:30
  • Thank you and is it possible to use this for 3d lines? – Moe Dec 08 '19 at 05:43
  • 1
    Based on [this comment by the author](https://github.com/xnx/lineticks/issues/1#issuecomment-249355572), lineticks only works for 2D lines. – jirassimok Dec 08 '19 at 05:46
  • Does exist something similar for 3d lines? I would like to add ticks to 3d lines. – Moe Dec 08 '19 at 05:51
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/203831/discussion-between-moe-and-jirassimok). – Moe Dec 08 '19 at 05:52
  • Rather than providing the link to another answer to install a general package manually, it would be good if the answer was more specific and gave details on how to install lineticks manually as I'm having the same problem and this answer doesn't fully help me because the linked answer is unclear to me. Also the "discussion in chat" is not available to me. – Hendrix13 Apr 08 '23 at 05:34