Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Termux and Linux Deploy #6

Open
Talmio216 opened this issue Dec 4, 2020 · 11 comments
Open

Unable to install on Termux and Linux Deploy #6

Talmio216 opened this issue Dec 4, 2020 · 11 comments

Comments

@Talmio216
Copy link

Have been using tgcloud on my old computer (Linux Mint Tricia, x86) for a couple of months. For better experience, decided to install it both on my Xiaomi phone (Termux app) and Lenovo tablet (Linux Deploy app).
However, the normal installation of cryptg through pip install cryptg failed both times, giving this error log:

Collecting cryptg
  Using cached cryptg-0.2.post0.tar.gz (16 kB)
    ERROR: Command errored out with exit status 1:
     command: /data/data/com.termux/files/usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-q9103x19/cryptg/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-q9103x19/cryptg/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 /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-n729x67v
         cwd: /data/data/com.termux/files/usr/tmp/pip-install-q9103x19/cryptg/
    Complete output (46 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: /data/data/com.termux/files/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-wheel-pejbf0zb/cffi/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-wheel-pejbf0zb/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /data/data/com.termux/files/usr/tmp/pip-wheel-a82fcu1r
           cwd: /data/data/com.termux/files/usr/tmp/pip-wheel-pejbf0zb/cffi/
      Complete output (6 lines):
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help

      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for cffi
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/data/data/com.termux/files/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/data/data/com.termux/files/usr/tmp/tmpk0y57itt', '--quiet', 'cffi>=1.0.0']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/data/data/com.termux/files/usr/tmp/pip-install-q9103x19/cryptg/setup.py", line 63, in <module>
        main(sys.argv)
      File "/data/data/com.termux/files/usr/tmp/pip-install-q9103x19/cryptg/setup.py", line 19, in main
        setup(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 764, in resolve
        dist = best[req.key] = env.best_match(
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1049, in best_match
        return self.obtain(req, installer)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1061, in obtain
        return installer(requirement)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/data/data/com.termux/files/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/data/data/com.termux/files/usr/tmp/tmpk0y57itt', '--quiet', 'cffi>=1.0.0']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

The upgrading of setuptools (with pip install --upgrade setuptools) didn't help.
Unfortunately, I'm new to Linux. Thank you very much!

@Lonami
Copy link
Collaborator

Lonami commented Dec 5, 2020

Did you pip install wheel?

@Talmio216
Copy link
Author

Now I did, and the installation went successfully. Thank you again! ^_^

@Lonami
Copy link
Collaborator

Lonami commented Dec 5, 2020

As I understand it, these tools are not required for setup.py but since a lot of projects assume they will be there, they normally end up being installed.

See What the heck is pyproject.toml? and the linked previous article for more on this problem and its solutions.

@Talmio216
Copy link
Author

Managed to make it work on Linux Deploy today! After connecting to the tablet by ssh and trying to install again, I read the log, searched for error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 on the net, and found the solution here. After running sudo apt-get install gcc libffi-dev libssl-dev python3-dev, I was able to finally install cryptg on the tablet.

@cher-nov
Copy link
Owner

cher-nov commented Dec 30, 2020

@Talmio216 Could you provide the whole unsuccessfull log please?

@landfillbaby
Copy link

there are no pypi-published source packages for versions 0.2.post1 and 0.2.post2

@cher-nov
Copy link
Owner

there are no pypi-published source packages for versions 0.2.post1 and 0.2.post2

They're were just releases with tinyaes library updated, so I didn't make source releases, only wheel ones.

@landfillbaby
Copy link

this causes problems for platforms other than x86
termux/termux-packages#6664

@cher-nov
Copy link
Owner

this causes problems for platforms other than x86
termux/termux-packages#6664

#9 (comment)

@mrcsmsmsm
Copy link

PIP install pyproject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants