GoogleCloudPlatform / cloud-profiler-python

Stackdriver Profiler Python agent is a tool that continuously gathers CPU usage information from Python applications
Apache License 2.0
27 stars 23 forks source link

pip install error #126

Closed zdyj3170101136 closed 1 year ago

zdyj3170101136 commented 1 year ago
[root@plat-sh-infra-prod-jaeger-collector003 pypprof]# pip3 install google-cloud-profiler
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting google-cloud-profiler
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/f5/b1/6a5f55bdcdc6d952268b91b4572b5ea31921f3e641cdbab464e6d68e5035/google-cloud-profiler-4.0.0.tar.gz (30 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wmo86p7q/google-cloud-profiler/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wmo86p7q/google-cloud-profiler/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-install-wmo86p7q/google-cloud-profiler/pip-egg-info
         cwd: /tmp/pip-install-wmo86p7q/google-cloud-profiler/
    Complete output (50 lines):
    running egg_info
    creating /tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info
    writing /tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info/dependency_links.txt
    writing requirements to /tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info/requires.txt
    writing top-level names to /tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info/top_level.txt
    writing manifest file '/tmp/pip-install-wmo86p7q/google-cloud-profiler/pip-egg-info/google_cloud_profiler.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-wmo86p7q/google-cloud-profiler/setup.py", line 112, in <module>
        'Programming Language :: Python :: 3.9',
      File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 296, in run
        self.find_sources()
      File "/usr/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
        mm.run()
      File "/usr/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 534, in run
        self.add_defaults()
      File "/usr/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
        sdist.add_defaults(self)
      File "/usr/lib/python3.7/distutils/command/sdist.py", line 226, in add_defaults
        self._add_defaults_python()
      File "/usr/lib/python3.7/site-packages/setuptools/command/sdist.py", line 127, in _add_defaults_python
        build_py = self.get_finalized_command('build_py')
      File "/usr/lib/python3.7/distutils/cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/lib/python3.7/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/usr/lib/python3.7/site-packages/setuptools/command/build_py.py", line 34, in finalize_options
        orig.build_py.finalize_options(self)
      File "/usr/lib/python3.7/distutils/command/build_py.py", line 45, in finalize_options
        ('force', 'force'))
      File "/usr/lib/python3.7/distutils/cmd.py", line 286, in set_undefined_options
        src_cmd_obj = self.distribution.get_command_obj(src_cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 857, in get_command_obj
        klass = self.get_command_class(command)
      File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 840, in get_command_class
        self.cmdclass[command] = cmdclass = ep.load()
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load
        return self.resolve()
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
    ModuleNotFoundError: No module named 'setuptools.command.build'
    ----------------------------------------
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 20.0.2; however, version 22.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
psx95 commented 1 year ago

I am unable to reproduce this issue. Steps taken were


Could you verify if setuptools is installed?

psx95 commented 1 year ago

Closing this issue as there is no activity since past 30 days. Feel free to re-open in case this is still an issue.