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

InvalidSpecifier error using pipenv to install pytz specific version #3204

Closed
babaMar opened this issue Nov 9, 2018 · 0 comments
Closed

Comments

@babaMar
Copy link

babaMar commented Nov 9, 2018

Issue description

pipenv raises InvalidSpecifier when trying to install pytz==2012h in requirements file

Expected result

package to be installed

Actual result

Traceback (most recent call last):
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 101, in <module>
    main()
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 90, in main
    system=system,
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 73, in resolve
    allow_global=system,
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/utils.py", line 453, in resolve_deps
    version = str(req.get_version())
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1008, in
get_version
    return parse_version(self.get_specifier().version)
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1005, in
get_specifier
    return Specifier(self.specifiers)
  File "/home/stefano/.local/lib/python3.6/site-packages/pipenv/vendor/packaging/specifiers.py", line 85, in __init__
    raise InvalidSpecifier("Invalid specifier: '{0}'".format(spec))
packaging.specifiers.InvalidSpecifier: Invalid specifier: '==2012h'
/home/stefano/.local/lib/python3.6/site-packages/pipenv/_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/pipenv-q9klYm-requirements'>
  warnings.warn(warn_message, ResourceWarning)

Steps to replicate

Installed virtualenv with pipenv shell --python 2.7 and dependencies with pipenv install -r requirements.txt


$ pipenv --support

Pipenv version: '2018.10.13'

Pipenv location: '/home/stefano/.local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.7.1: /usr/local/bin/python3.7m
  • 3.7.1: /usr/local/bin/python3.7
  • 3.6.6: /usr/bin/python3.6m
  • 3.6.6: /usr/bin/python3.6
  • 2.7.15rc1: /home/stefano/.local/share/virtualenvs/mailexpress-sender-Fmumk5VO/bin/python2.7
  • 2.7.15rc1: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.6',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-38-generic',
 'platform_system': 'Linux',
 'platform_version': '#41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018',
 'python_full_version': '3.6.6',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • BYOBU_ACCENT
  • BYOBU_BACKEND
  • BYOBU_CHARMAP
  • BYOBU_CONFIG_DIR
  • BYOBU_DARK
  • BYOBU_DATE
  • BYOBU_DISTRO
  • BYOBU_HIGHLIGHT
  • BYOBU_LIGHT
  • BYOBU_PAGER
  • BYOBU_PREFIX
  • BYOBU_PYTHON
  • BYOBU_READLINK
  • BYOBU_RUN_DIR
  • BYOBU_SED
  • BYOBU_TERM
  • BYOBU_TIME
  • BYOBU_TTY
  • BYOBU_ULIMIT
  • BYOBU_WINDOW_NAME
  • COLORTERM
  • COMPIZ_CONFIG_PROFILE
  • DBUS_SESSION_BUS_ADDRESS
  • DEFAULTS_PATH
  • DESKTOP_SESSION
  • DISPLAY
  • GDMSESSION
  • GDM_LANG
  • GITHUB_DEPLOY_TOKEN
  • GPG_AGENT_INFO
  • GTK_MODULES
  • GTK_OVERLAY_SCROLLING
  • HOME
  • LANG
  • LANGUAGE
  • LC_ADDRESS
  • LC_CTYPE
  • LC_IDENTIFICATION
  • LC_MEASUREMENT
  • LC_MONETARY
  • LC_NAME
  • LC_NUMERIC
  • LC_PAPER
  • LC_TELEPHONE
  • LC_TIME
  • LESS
  • LOGNAME
  • LSCOLORS
  • LS_COLORS
  • MANDATORY_PATH
  • MATE_DESKTOP_SESSION_ID
  • MEX_LAB
  • OLDPWD
  • PAGER
  • PATH
  • PWD
  • QT_ACCESSIBILITY
  • QT_AUTO_SCREEN_SCALE_FACTOR
  • QT_QPA_PLATFORMTHEME
  • QT_SCALE_FACTOR
  • SESSION_MANAGER
  • SHELL
  • SHLVL
  • SSH_AGENT_PID
  • SSH_AUTH_SOCK
  • TERM
  • TMUX
  • TMUX_PANE
  • UBUNTU_MENUPROXY
  • USER
  • VTE_VERSION
  • WINDOWID
  • XAUTHORITY
  • XDG_CONFIG_DIRS
  • XDG_CURRENT_DESKTOP
  • XDG_DATA_DIRS
  • XDG_GREETER_DATA_DIR
  • XDG_RUNTIME_DIR
  • XDG_SEAT
  • XDG_SEAT_PATH
  • XDG_SESSION_DESKTOP
  • XDG_SESSION_ID
  • XDG_SESSION_PATH
  • XDG_SESSION_TYPE
  • XDG_VTNR
  • ZSH
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PIPENV_ACTIVE
  • VIRTUAL_ENV
  • PS1

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: /home/stefano/.local/share/virtualenvs/mailexpress-sender-Fmumk5VO/bin:/home/stefano/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /usr/bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /home/stefano/CGProjects/customergauge-mex-lab/repos/mailexpress-sender
  • VIRTUAL_ENV: /home/stefano/.local/share/virtualenvs/mailexpress-sender-Fmumk5VO

Contents of Pipfile ('/home/stefano/CGProjects/customergauge-mex-lab/repos/mailexpress-sender/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
alembic = "==0.9.3"
"autopep8" = "==1.3.2"
"boto3" = "==1.5.31"
botocore = "==1.8.50"
certifi = "==2017.4.17"
chardet = "==3.0.4"
click = "==6.7"
configparser = "==3.5.0"
decorator = "==4.0.11"
docutils = "==0.14"
"enum34" = "==1.1.6"
first = "==2.0.1"
"flake8" = "==3.4.1"
funcsigs = "==1.0.2"
futures = "==3.2.0"
idna = "==2.5"
ipython = "==5.4.1"
jmespath = "==0.9.3"
mccabe = "==0.6.1"
mock = "==2.0.0"
nexmo = "==1.2.0"
"pathlib2" = "==2.3.0"
pbr = "==3.1.1"
pexpect = "==4.2.1"
pickleshare = "==0.7.4"
pip-tools = "==1.9.0"
psutil = "==5.2.2"
ptyprocess = "==0.5.2"
py = "==1.4.34"
pycodestyle = "==2.3.1"
pyflakes = "==1.5.0"
pytest = "==3.1.2"
pytest-mock = "==1.6.0"
python-dateutil = "==2.6.1"
python-editor = "==1.0.3"
python-json-logger = "==0.1.8"
pytz = "==2012h"
redis = "==2.7.6"
requests = "==2.18.1"
rq = "==0.10.0"
"s3transfer" = "==0.1.13"
scandir = "==1.5"
sendgrid = "==1.5.3"
simplegeneric = "==0.8.1"
six = "==1.10.0"
smtpapi = "==0.2.0"
traitlets = "==4.3.2"
"urllib3" = "==1.21.1"
wcwidth = "==0.1.7"
"backports.shutil_get_terminal_size" = "==1.0.0"
ipython_genutils = "==0.2.0"
Mako = "==1.0.7"
MarkupSafe = "==1.0"
prompt_toolkit = "==1.0.14"
Pygments = "==2.2.0"
PyMySQL = "==0.7.11"
SQLAlchemy = "==1.1.9"

[dev-packages]

[requires]
python_version = "2.7"
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

1 participant