NameError: global name 'InvalidMarker' is not defined
See original GitHub issueIssue description
pipenv install
results in NameError: global name 'InvalidMarker' is not defined
traceback.
I’ve seen several other closed issues related to Invalid Marker, but I was unable to discover any cause from them.
Expected result
Should have created new virtualenv and installed glyphsLib 2.4.0 and its dependencies
Actual result
C:\SRC\GitHub\pysilfont>pipenv.exe --rm
Removing virtualenv (C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6)...
C:\SRC\GitHub\pysilfont>pipenv.exe install --verbose
Creating a virtualenv for this project...
Pipfile: C:\SRC\GitHub\pysilfont\Pipfile
Using C:\Python27\python.exe (2.7.13) to create virtualenv...
Running virtualenv with interpreter C:\Python27\python.exe
New python executable in C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6\Scripts\python.exe
Installing setuptools, pip, wheel...done.
Setting project for pysilfont-Lv_ggtc6 to C:\SRC\GitHub\pysilfont
Virtualenv location: C:\Users\bobh\.virtualenvs\pysilfont-Lv_ggtc6
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python27\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\python27\lib\site-packages\pipenv\cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "c:\python27\lib\site-packages\pipenv\core.py", line 1943, in do_install
pypi_mirror=pypi_mirror,
File "c:\python27\lib\site-packages\pipenv\core.py", line 1312, in do_init
pypi_mirror=pypi_mirror,
File "c:\python27\lib\site-packages\pipenv\core.py", line 1057, in do_lock
settings['packages'], project, r=False, include_index=True
File "c:\python27\lib\site-packages\pipenv\utils.py", line 513, in convert_deps_to_pip
new_dep = Requirement.from_pipfile(dep_name, dep)
File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 766, in from_pipfile
r = NamedRequirement.from_pipfile(name, pipfile)
File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 88, in from_pipfile
return cls(**creation_args)
File "<attrs generated init a6e0ca26c49ba3dc9d3385e0a2ff78e4bcd1f859>", line 9, in __init__
File "c:\python27\lib\site-packages\pipenv\vendor\attr\validators.py", line 106, in __call__
self.validator(inst, attr, value)
File "c:\python27\lib\site-packages\pipenv\vendor\requirementslib\models\utils.py", line 140, in validate_specifiers
except (InvalidMarker, InvalidSpecifier):
NameError: global name 'InvalidMarker' is not defined
c:\python27\lib\site-packages\pipenv\_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory 'c:\\users\\bobh\\appdata\\local\\temp\\pipenv-ai84cx-requirements'>
warnings.warn(warn_message, ResourceWarning)
C:\SRC\GitHub\pysilfont>
Steps to replicate
pipenv.exe install --verbose
Pipfile is show within the pipenv --support
output included below.
$ pipenv --support
Pipenv version: '2018.7.1'
Pipenv location: 'c:\\python27\\lib\\site-packages\\pipenv'
Python location: 'c:\\python27\\python.exe'
Other Python installations in PATH
:
-
2.7
:C:\Python27\python.exe
-
2.7.13
:C:\Python27\python.exe
-
3.7.0
:C:\Windows\py.exe
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'nt',
'platform_machine': 'AMD64',
'platform_python_implementation': 'CPython',
'platform_release': '10',
'platform_system': 'Windows',
'platform_version': '10.0.17134',
'python_full_version': '2.7.13',
'python_version': '2.7',
'sys_platform': 'win32'}
System environment variables:
TMP
COMPUTERNAME
USERDOMAIN
PSMODULEPATH
PYTHONDONTWRITEBYTECODE
COMMONPROGRAMFILES
PROCESSOR_IDENTIFIER
VBOX_MSI_INSTALL_PATH
PROGRAMFILES
PROCESSOR_REVISION
PATH
SYSTEMROOT
PROGRAMFILES(X86)
COMSPEC
DRIVERDATA
TEMP
COMMONPROGRAMFILES(X86)
GDLPP_PREFS
PROCESSOR_ARCHITECTURE
ALLUSERSPROFILE
LOCALAPPDATA
HOMEPATH
USERDOMAIN_ROAMINGPROFILE
PROGRAMW6432
USERNAME
LOGONSERVER
PROMPT
SESSIONNAME
PROGRAMDATA
ONEDRIVE
PERLLIB
PATHEXT
PIP_PYTHON_PATH
ASL.LOG
WINDIR
APPDATA
HOMEDRIVE
SYSTEMDRIVE
NUMBER_OF_PROCESSORS
SAL_DISABLE_GRAPHITE
PROCESSOR_LEVEL
PROCESSOR_ARCHITEW6432
COMMONPROGRAMW6432
OS
PUBLIC
USERPROFILE
PipenvΓÇôspecific environment variables:
DebugΓÇôspecific environment variables:
PATH
:C:\Program Files (x86)\Intel\iCLS Client\;C:\Python27\;C:\Python27\Scripts;C:\DosUtils;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\Program Files\IDM Computer Solutions\UltraEdit;C:\Program Files\IDM Computer Solutions\UltraCompare;C:\Program Files\PuTTY\;C:\DosUtils\Libxml;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\HashiCorp\Vagrant\bin;C:\Program Files\Graphite Compiler\;C:\Program Files (x86)\Adobe\FDK\Tools\win;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Users\bobh\AppData\Local\Microsoft\WindowsApps;C:\Users\bobh\AppData\Local\atom\bin;C:\Users\bobh\AppData\Local\Microsoft\WindowsApps;C:\Users\bobh\AppData\Local\Atlassian\SourceTree\git_local\mingw32\bin\;
Contents of Pipfile
(‘C:\SRC\GitHub\pysilfont\Pipfile’):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
glyphsLib = "2.4.0"
[dev-packages]
glyphsLib = "2.4.0"
[requires]
python_version = "2.7"
[pipenv]
allow_prereleases = true
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top GitHub Comments
@bobh0303 The right syntax generated by
pipenv install glyphsLib==2.4.0
is:This would be helpful to include in the example documentation, either for Pipenv or Pipfile. I was stuck with the same problem and didn’t realize it was a formatting issue.