cloudify-cosmo / cloudify-cli

Cloudify's CLI
Apache License 2.0
42 stars 47 forks source link

Installation of the CLI is not working on Ubuntu 20.04 #1181

Open Sispheor opened 3 years ago

Sispheor commented 3 years ago

With the deb package:

sudo dpkg -i cloudify-cli_5.1.1-ga_amd64.deb 
[sudo] password for nico: 
Selecting previously unselected package cloudify.
(Reading database ... 196562 files and directories currently installed.)
Preparing to unpack cloudify-cli_5.1.1-ga_amd64.deb ...
Unpacking cloudify (5.1.1) ...
dpkg: dependency problems prevent configuration of cloudify:
 cloudify depends on python3 (<< 3.7); however:
  Version of python3 on system is 3.8.2-0ubuntu2.

dpkg: error processing package cloudify (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 cloudify

Then with pip, install ok. (in a pipx venv)

pipx install cloudify
⚠️  Note: cfy was already on your PATH at /usr/bin/cfy
  installed package cloudify 20.3.3, Python 3.8.5
  These apps are now globally available
    - cfy
done! ✨ 🌟 ✨

Then when I run cfy

cfy
Traceback (most recent call last):
  File "/home/nico/.local/bin/cfy", line 5, in <module>
    from cloudify_cli.main import _cfy
  File "/home/nico/.local/pipx/venvs/cloudify/lib/python3.8/site-packages/cloudify_cli/main.py", line 18, in <module>
    from .cli import cfy
  File "/home/nico/.local/pipx/venvs/cloudify/lib/python3.8/site-packages/cloudify_cli/cli/cfy.py", line 21, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'
Sispheor commented 3 years ago

BTW, python 3.7 is also installed on my workstation.

python
python3                                       python3.8                                     python3-pasteurize                            python-argcomplete-tcsh                     
python3.7                                     python3.8-config                              python3-pbr                                                                               
python3.7m                                    python3-config                                python3-unit2                                                                             
python3.7m-config                             python3-futurize                              python-argcomplete-check-easy-install-script
Sispheor commented 3 years ago

Seems that it has been fixed in the last 20.12.15 version. Would it be possible to push this version on Pypi?

Sispheor commented 3 years ago

Installing in Pythoin 3.7 venv fail too

pipx install cloudify --python /usr/local/bin/python3.7 --include-deps
    ERROR: Command errored out with exit status 1:
     command: /home/nico/.local/pipx/venvs/cloudify/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d7ggai76/cloudify_c48ace76dcec4adbbee75c49e73ae808/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d7ggai76/cloudify_c48ace76dcec4adbbee75c49e73ae808/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 /tmp/pip-pip-egg-info-h3y4rbi1
         cwd: /tmp/pip-install-d7ggai76/cloudify_c48ace76dcec4adbbee75c49e73ae808/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/nico/.local/pipx/shared/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution
      File "/home/nico/.local/pipx/shared/lib/python3.8/site-packages/setuptools/dist.py", line 32, in <module>
        from setuptools import windows_support
      File "/home/nico/.local/pipx/shared/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
01000101 commented 3 years ago

I can confirm this is still an ongoing issue. It seems that the Cloudify package in PyPi hasn't been updated. Here's a test using latest (default) of v20.03.03.

cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ python3 -m venv venv
cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ source venv/bin/activate
(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ pip3 install cloudify
Collecting cloudify
  Downloading cloudify-20.03.03.tar.gz (92 kB)
{... snip ...}

(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ cfy init
Traceback (most recent call last):
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/bin/cfy", line 11, in <module>
    load_entry_point('cloudify==20.3.3', 'console_scripts', 'cfy')()
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/cloudify_cli/main.py", line 18, in <module>
    from .cli import cfy
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/cloudify_cli/cli/cfy.py", line 21, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'

I then tried to use a similar version as my Cloudify Premium Trial. But this fails with a different error.

(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ pip3 install cloudify==20.12.15
ERROR: Could not find a version that satisfies the requirement cloudify==20.12.15 (from versions: 3.0, 3.1, 3.2, 3.2.1, 3.3, 3.3.1, 3.4, 3.4.1, 3.4.2, 4.2, 4.3, 4.3.1, 4.3.2, 4.3.3, 4.4, 4.5, 4.5.5, 4.6, 5.0.0, 5.0.5.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.1.4, 5.2.0, 5.2.1, 5.2.2.dev1, 5.2.2, 5.2.3, 5.2.4, 18.2.28, 18.7.23, 18.10.4, 19.1.24, 19.7.18, 19.10.27, 20.3.3)
ERROR: No matching distribution found for cloudify==20.12.15
(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ pip3 install cloudify==5.2.4
Collecting cloudify==5.2.4
  Downloading cloudify-5.2.4.tar.gz (123 kB)
{... snip ...}

(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ cfy init
Traceback (most recent call last):
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/bin/cfy", line 5, in <module>
    from cloudify_cli.main import _cfy
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/cloudify_cli/main.py", line 20, in <module>
    from .commands import init
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/cloudify_cli/commands/init.py", line 26, in <module>
    from .. import local
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/cloudify_cli/local.py", line 25, in <module>
    from dsl_parser.parser import parse_from_path
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/dsl_parser/parser.py", line 15, in <module>
    from dsl_parser.framework import parser
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/dsl_parser/framework/parser.py", line 17, in <module>
    import networkx as nx
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/networkx/__init__.py", line 76, in <module>
    import networkx.readwrite
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/networkx/readwrite/__init__.py", line 14, in <module>
    from networkx.readwrite.gml import *
  File "/home/cerealkiller/Desktop/Dev/cloudify/docs.getcloudify.org/venv/lib/python3.8/site-packages/networkx/readwrite/gml.py", line 39, in <module>
    from cgi import escape
ImportError: cannot import name 'escape' from 'cgi' (/usr/lib/python3.8/cgi.py)

Versions...

(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.10
DISTRIB_CODENAME=groovy
DISTRIB_DESCRIPTION="Ubuntu 20.10"
(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ python -V
Python 3.8.10
(venv) cerealkiller@thegibson:~/Desktop/Dev/cloudify/docs.getcloudify.org$ pip3 -V
pip 20.1.1