Skip to content

TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero' #132

@luispintoc

Description

@luispintoc

I was successfully pip installing in AWS SageMaker every time I would spin-up a new notebook instance but now I can't. I tried changing instances but same behavior.

I get the following:

Collecting pytorch-fast-transformers
  Downloading pytorch-fast-transformers-0.4.0.tar.gz (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.6/93.6 kB 1.7 MB/s eta 0:00:00a 0:00:01
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info
      writing /tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/SOURCES.txt'
      /home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/torch/utils/cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
        warnings.warn(msg.format('we could not find ninja.'))
      reading manifest file '/tmp/pip-pip-egg-info-ekqoyjyc/pytorch_fast_transformers.egg-info/SOURCES.txt'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-9zbnjz3d/pytorch-fast-transformers_5293fc405c4344829b2e4f5fa8d25322/setup.py", line 221, in <module>
          setup_package()
        File "/tmp/pip-install-9zbnjz3d/pytorch-fast-transformers_5293fc405c4344829b2e4f5fa8d25322/setup.py", line 194, in setup_package
          setup(
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
          self.run_command(cmd)
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/dist.py", line 945, in run_command
          super().run_command(command)
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
          cmd_obj.run()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 310, in run
          self.find_sources()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 318, in find_sources
          mm.run()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 544, in run
          self.prune_file_list()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 610, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 266, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/home/ec2-user/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 284, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions