Ignoring colorama: markers 'sys_platform == "win32"' don't match your environment
Ignoring configparser: markers 'python_version < "3.2"' don't match your environment
Ignoring enum34: markers 'python_version < "3.4"' don't match your environment
Ignoring funcsigs: markers 'python_version < "3.0"' don't match your environment
I've started getting the above errors whenever I install packages with pipenv into a pipenv
created virtualenv.
I use the following command to install some base packages into each virtualenv:
β― pipenv install --dev flake8 jedi importmagic epc autopep8 yapf pytest json-rpc service_factory autoflake hy isort bpython
Everytime I do, I get the warnings. It never used to be like that untill the recent homebrew python/python@2 updates. I don't know if it's got anything to do with it.
Adding bpython to Pipfile's [dev-packages]β¦
Pipfile.lock not found, creatingβ¦
Locking [dev-packages] dependenciesβ¦
Locking [packages] dependenciesβ¦
Updated Pipfile.lock (e8633e)!
Installing dependencies from Pipfile.lock (e8633e)β¦
π ββββββββββββββββββββββββββββββββ 31/31 β 00:00:02
Adding bpython to Pipfile's [dev-packages]β¦
Pipfile.lock not found, creatingβ¦
Locking [dev-packages] dependenciesβ¦
Locking [packages] dependenciesβ¦
Updated Pipfile.lock (e8633e)!
Installing dependencies from Pipfile.lock (e8633e)β¦
Ignoring colorama: markers 'sys_platform == "win32"' don't match your environment
Ignoring configparser: markers 'python_version < "3.2"' don't match your environment
Ignoring enum34: markers 'python_version < "3.4"' don't match your environment
Ignoring funcsigs: markers 'python_version < "3.0"' don't match your environment
π ββββββββββββββββββββββββββββββββ 31/31 β 00:00:02
β― pipenv install --dev selenium
β― cat Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
"flake8" = "*"
jedi = "*"
importmagic = "*"
epc = "*"
"autopep8" = "*"
yapf = "*"
pytest = "*"
json-rpc = "*"
service-factory = "*"
autoflake = "*"
hy = "*"
isort = "*"
bpython = "*"
selenium = "*"
[requires]
python_version = "3.6"
These are not errors. Please read them.
I think this needs to be investigated further.
I am suddenly seeing a marker that was not there when I regenerated a Pipfile.lock
last week:
"colorama": {
"hashes": [
"sha256:463f8483208e921368c9f306094eb6f725c6ca42b0f97e313cb5d5512459feda",
"sha256:48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1"
],
"markers": "sys_platform == 'win32'",
"version": "==0.3.9"
},
colorama
has had no recent releases and only one package depends on it:
colorama==0.3.7
- coverage-space==1.0 [requires: colorama~=0.3]
It seems that pipenv
is now adding invalid markers when locking that cause my project to fail when run on macOS: ModuleNotFoundError: No module named 'colorama'
@jacebrowning lockfiles now resolve all dependencies for all platforms, the marker in your lockfile is completely valid.
@techalchemy Here's the smallest test case I could find.
With this Pipfile
on macOS and pipenv 11.8.0:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[requires]
python_version = "3.6"
[packages]
arrow = "*"
coverage-space = "*"
faker = "*"
fire = "*"
freezegun = "*"
inflection = "*"
jupyter = "*"
pillow = "~=4.3"
pycodestyle = "~=2.3.1"
pylint = "~=1.7.5"
pytest = "~= 3.3"
pytest-cov = "*"
pytest-describe = "*"
pytest-expecter = "~= 1.1"
pytest-html = "*"
pytest-json-report = "~= 0.6"
pytest-mock = "*"
pytest-ordering = "*"
pytest-random = "*"
splinter = "*"
tldextract = "*"
watchdog = "*"
$ pipenv install
Creating a virtualenv for this projectβ¦
Using /Users/Browning/.pyenv/versions/3.6.3/bin/python3.6m (3.6.3) to create virtualenvβ¦
...
Installing dependencies from Pipfile.lock (1ba60a)β¦
Ignoring colorama: markers 'sys_platform == "win32"' don't match your environment
Ignoring funcsigs: markers 'python_version < "3.0"' don't match your environment
π ββββββββββββββββββββββββββββββββ 88/88 β 00:00:26
To activate this project's virtualenv, run the following:
$ pipenv shell
which results in a broken environment:
$ pipenv run coverage.space
Traceback (most recent call last):
File "/Users/Browning/.local/share/virtualenvs/colorama-demo-Q5bNGJGk/bin/coverage.space", line 7, in <module>
from coveragespace.cli import main
File "/Users/Browning/.local/share/virtualenvs/colorama-demo-Q5bNGJGk/lib/python3.6/site-packages/coveragespace/cli.py", line 24, in <module>
import colorama
ModuleNotFoundError: No module named 'colorama'
despite coverage-space
directly requiring it:
$ pipenv graph --reverse
...
colorama==0.3.7
- coverage-space==1.0 [requires: colorama~=0.3]
...
So it seems that one of the other packages only requires colorama
on Windows and their markers are overriding the fact that another package depends on colorama
unconditionally.
I'll surface this as a new issue.
Having
[packages]
gevent = {version = "*", extras = ["dnspython"]}
in Pipfile
produces
(packy-agent2) dmugtasimov@dmugtasimov-Latitude-E5550 ~/gitrep/packy/packy-agent2 $ pipenv install
Installing dependencies from Pipfile.lock (474928)β¦
Ignoring dnspython: markers 'extra == "dnspython"' don't match your environment
Ignoring idna: markers 'extra == "dnspython"' don't match your environment
π ββββββββββββββββββββββββββββββββ 71/71 β 00:01:16
How should I fix it?
I seem to be running into this as well.
In a fresh environment:
> pipenv install connexion[swagger-ui]
...
Adding connexion to Pipfile's [packages]β¦
Pipfile.lock not found, creatingβ¦
Locking [dev-packages] dependenciesβ¦
Locking [packages] dependenciesβ¦
Updated Pipfile.lock (45d93c)!
Installing dependencies from Pipfile.lock (45d93c)β¦
π ββββββββββββββββββββββββββββββββ 19/19 β 00:00:05
Ignoring swagger-ui-bundle: markers 'extra == "swagger-ui"' don't match your environment
If I "manually" install, it works fine:
> pipenv run pip install connexion[swagger-ui]
Get this one as well:
pipenv install autobahn[serialization]
...
Ignoring cbor: markers 'extra == "serialization"' don't match your environment
Ignoring py-ubjson: markers 'extra == "serialization"' don't match your environment
Ignoring u-msgpack-python: markers 'extra == "serialization"' don't match your environment
...
Can someone (@techalchemy?) please elaborate whether this is bug a "harmless" warning?
Markers present in lock file btw:
"cbor": {
"hashes": [
"sha256:13225a262ddf5615cbd9fd55a76a0d53069d18b07d2e9f19c39e6acb8609bbb6"
],
"markers": "extra == 'serialization'",
"version": "==1.0.0"
},
It's not harmless, the packages are not installed and so importing them fails.
β p pipenv --python 2.7 install 'requests[security]' cryptography
Creating a virtualenv for this projectβ¦
Pipfile: /private/tmp/p/Pipfile
Using /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (2.7.15) to create virtualenvβ¦
β Running virtualenv with interpreter /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
New python executable in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/aw/.local/share/virtualenvs/p-sRRNr5uw
Installing requests[security]β¦
Collecting requests[security]
Using cached https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests[security])
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests[security])
Using cached https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests[security])
Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests[security])
Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting cryptography>=1.3.4; extra == "security" (from requests[security])
Using cached https://files.pythonhosted.org/packages/39/a7/a2c8e2cee558caffe09f4406615adeabea3d75f97ecc20f8a8f629313f02/cryptography-2.4.1-cp27-cp27m-macosx_10_6_intel.whl
Collecting pyOpenSSL>=0.14; extra == "security" (from requests[security])
Using cached https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.7 (from cryptography>=1.3.4; extra == "security"->requests[security])
Using cached https://files.pythonhosted.org/packages/7e/4a/b647e46faaa2dcfb16069b6aad2d8509982fd63710a325b8ad7db80f18be/cffi-1.11.5-cp27-cp27m-macosx_10_6_intel.whl
Collecting enum34; python_version < "3" (from cryptography>=1.3.4; extra == "security"->requests[security])
Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting six>=1.4.1 (from cryptography>=1.3.4; extra == "security"->requests[security])
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.3.4; extra == "security"->requests[security])
Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography>=1.3.4; extra == "security"->requests[security])
Using cached https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.7->cryptography>=1.3.4; extra == "security"->requests[security])
Installing collected packages: chardet, certifi, urllib3, idna, pycparser, cffi, enum34, six, asn1crypto, ipaddress, cryptography, pyOpenSSL, requests
Successfully installed asn1crypto-0.24.0 certifi-2018.10.15 cffi-1.11.5 chardet-3.0.4 cryptography-2.4.1 enum34-1.1.6 idna-2.7 ipaddress-1.0.22 pyOpenSSL-18.0.0 pycparser-2.19 requests-2.20.1 six-1.11.0 urllib3-1.24.1
Adding requests to Pipfile's [packages]β¦
Installing cryptographyβ¦
Requirement already up-to-date: cryptography in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (2.4.1)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.7 in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (1.11.5)
Requirement already satisfied, skipping upgrade: idna>=2.1 in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (2.7)
Requirement already satisfied, skipping upgrade: enum34; python_version < "3" in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (1.1.6)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (1.11.0)
Requirement already satisfied, skipping upgrade: asn1crypto>=0.21.0 in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (0.24.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < "3" in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cryptography) (1.0.22)
Requirement already satisfied, skipping upgrade: pycparser in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography) (2.19)
Adding cryptography to Pipfile's [packages]β¦
Installing dependencies from Pipfile.lock (b95785)β¦
Ignoring idna: markers 'extra == "security"' don't match your environment
Ignoring pyopenssl: markers 'extra == "security"' don't match your environment
π ββββββββββββββββββββββββββββββββ 13/13 β 00:00:02
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
β p pipenv run python -c "import idna"
β p pipenv --rm
Removing virtualenv (/Users/aw/.local/share/virtualenvs/p-sRRNr5uw)β¦
β p pipenv sync
Creating a virtualenv for this projectβ¦
Pipfile: /private/tmp/p/Pipfile
Using /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (2.7.15) to create virtualenvβ¦
β Running virtualenv with interpreter /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
New python executable in /Users/aw/.local/share/virtualenvs/p-sRRNr5uw/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/aw/.local/share/virtualenvs/p-sRRNr5uw
Installing dependencies from Pipfile.lock (b95785)β¦
Ignoring idna: markers 'extra == "security"' don't match your environment
Ignoring pyopenssl: markers 'extra == "security"' don't match your environment
π ββββββββββββββββββββββββββββββββ 13/13 β 00:00:03
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
All dependencies are now up-to-date!
β p pipenv run python -c "import idna"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named idna
Running into same issue. When I see that warning, no module is installed and importing fails. any fix/solution?
It's fixed in 2018.11.14
I am still seeing this on pipenv 2018.11.14
, I think it is definitely a real bug. It doesn't make sense that extras are markers that can't match an environment, does it?
Did you rebuild your Pipfile.lock with 2018.11.14?
Ah ha, no I didn't, that has fixed the issue! Thanks for the tip.
For anyone else trying to remedy this, make sure you pip install --upgrade pipenv
outside and inside your project's virtualenv. I rebuilt my lockfile by rm
ing it and then pipenv install
ing, but there is probably a better way to do that.
Seconding this fix. I had the same issue, upgrading pipenv, rm
-ing Pipfile.lock
, and then regenerating it fixed the problem.
Most helpful comment
It's fixed in 2018.11.14