找不到Lineticks模块

我的脚本中有:

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]])

根据这个网站

我得到一个错误:

ModuleNotFoundError: No module named 'lineticks'

我试过了:

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

编辑

咨询后我尝试了这个

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: 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.
吉拉西莫克

Lineticks不在Python包索引(PYPI)中,因此pip不知道在哪里找到它。这是导致您看到错误的原因。

此外,lineticks源没有setup.py因此,lineticks不是正确的包装,不能与一起安装pip

您需要手动安装

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章