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

Invalid version number: 0.3e #12

Closed
BercziSandor opened this issue Apr 5, 2023 · 2 comments
Closed

Invalid version number: 0.3e #12

BercziSandor opened this issue Apr 5, 2023 · 2 comments

Comments

@BercziSandor
Copy link

I wanted to use your package from PyCharm (poetry env.) like this:
from bitbucket.client import Client

PyCharm asked me if I wanted to install package, yes, as usual.
After that I got this:

Using version ^0.3e for BitBucket

Updating dependencies
Resolving dependencies...

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

• Installing bitbucket (0.3e)

EnvCommandError

Command C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\Scripts\pip.exe install --no-deps file:///C:/Users/VWW3224/AppData/Local/pypoetry/Cache/artifacts/eb/19/b5/2b28cffd83db306edc73eafac84c4645d801b4d710b9bc94255140cb4c/BitBucket-0.3e.tar.gz errored with the following return code 1, and output:
Processing c:\users\vww3224\appdata\local\pypoetry\cache\artifacts\eb\19\b5\2b28cffd83db306edc73eafac84c4645d801b4d710b9bc94255140cb4c\bitbucket-0.3e.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error

python setup.py egg_info did not run successfully.
exit code: 1

[44 lines of output]
C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\dist.py:561: UserWarning: The version specified ('0.3e') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  warnings.warn(
running egg_info
C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_normalization.py:93: SetuptoolsDeprecationWarning: Invalid version: '0.3e'.
        !!


        ###################
        # Invalid version #
        ###################
        '0.3e' is not valid according to PEP 440.

        Please make sure specify a valid version for your package.
        Also note that future releases of setuptools may halt the build process
        if an invalid version is given.


!!

  warnings.warn(cleandoc(msg), SetuptoolsDeprecationWarning)
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "<pip-setuptools-caller>", line 34, in <module>
  File "C:\Users\VWW3224\AppData\Local\Temp\1\pip-req-build-uzg36ei9\setup.py", line 8, in <module>
    setup(name="BitBucket",
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
    return run_commands(dist)
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
    dist.run_commands()
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\dist.py", line 1221, in run_command
    super().run_command(command)
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_distutils\cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\command\egg_info.py", line 220, in finalize_options
    parsed_version = packaging.version.Version(self.egg_version)
  File "C:\Users\VWW3224\AppData\Local\pypoetry\Cache\virtualenvs\jenkinsinfo-0CGVmcW0-py3.10\lib\site-packages\setuptools\_vendor\packaging\version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
setuptools.extern.packaging.version.InvalidVersion: Invalid version: '0.3e'
[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.

at c:\Users\VWW3224\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\env.py:1195 in _run

Failed to add packages, reverting the pyproject.toml file to its original content.

@ingmferrer
Copy link
Contributor

Hello, that's right, we are using bitbucket name for imports but the this library is called bitbucket-python in pypi.org so PyCharm is trying to install a different library, which is not the same as this one.

The only solution is to install with command
pip install bitbucket-python

@BercziSandor
Copy link
Author

Hello, yes, you are right.
In my case: poetry add bitbucket-python

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

2 participants