Closed eromoe closed 5 years ago
You are using python2, but it raises unicode
not defined error. I have no clue...
Wondering if it's actually running Python 3 but the paths are screwed up so it's importing from the 2.7 directories?
Hmmm, this only happens with the combination of "Pipenv installed under 2.7" and "virtualenv python<3.5" because python<3.5 doesn't have typing
module. It is a good catch.
Python2 has typing module. I suspect this is because the python installation is messed up and probably it is not a bug with pipenv.
@jxltom Let me elaborate it:
User installed pipenv under python2.7, with the dependencies of typing
(which only works under python2.7), then work in a virtualenv of Python 3.4, which doesn't have typing
module. However, pipenv lock
will use the virtualenv interpreter(python3.4) to call resolver.py
, and import the wrong typing
module(this is expected because the Pipenv interpreter site-packages is also in PYTHONPATH
).
With Python >= 3.5, this isn't a problem because the stdlib typing
module takes priority to Python 2 typing
module.
@frostming Sounds reasonable 👍
Issue description
$ pipenv --support
Pipenv version: `'2018.11.26'` Pipenv location: `'/usr/local/lib/python2.7/site-packages/pipenv'` Python location: `'/usr/bin/python2.7'` Python installations found: - `3.4.8`: `/usr/bin/python3` - `2.7.14`: `/usr/bin/python2.7` - `3.4.8`: `/usr/bin/python3.4m` PEP 508 Information: ``` {'implementation_name': 'cpython', 'implementation_version': '0', 'os_name': 'posix', 'platform_machine': 'x86_64', 'platform_python_implementation': 'CPython', 'platform_release': '4.14.72-68.55.amzn1.x86_64', 'platform_system': 'Linux', 'platform_version': '#1 SMP Fri Sep 28 21:14:54 UTC 2018', 'python_full_version': '2.7.14', 'python_version': '2.7', 'sys_platform': 'linux2'} ``` System environment variables: - `AWS_PATH` - `PYTHONDONTWRITEBYTECODE` - `LESSOPEN` - `SSH_CLIENT` - `LOGNAME` - `USER` - `HOME` - `PATH` - `PS1` - `LANG` - `LESS_TERMCAP_se` - `TERM` - `SHELL` - `EC2_AMITOOL_HOME` - `LESS_TERMCAP_me` - `LESS_TERMCAP_md` - `LESS_TERMCAP_mb` - `HISTSIZE` - `PYTHONFINDER_IGNORE_UNSUPPORTED` - `AWS_ELB_HOME` - `JAVA_HOME` - `EC2_HOME` - `LESS_TERMCAP_ue` - `AWS_AUTO_SCALING_HOME` - `PIP_PYTHON_PATH` - `_` - `AWS_DEFAULT_REGION` - `SSH_CONNECTION` - `AWS_CLOUDWATCH_HOME` - `SSH_TTY` - `OLDPWD` - `HOSTNAME` - `HISTCONTROL` - `SHLVL` - `PWD` - `LESS_TERMCAP_us` - `PIP_SHIMS_BASE_MODULE` - `PIP_DISABLE_PIP_VERSION_CHECK` - `MAIL` - `LS_COLORS` Pipenv–specific environment variables: Debug–specific environment variables: - `PATH`: `/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin` - `SHELL`: `/bin/bash` - `LANG`: `en_US.UTF-8` - `PWD`: `/home/hadoop/sales-forecast` --------------------------- Contents of `Pipfile` ('/home/hadoop/sales-forecast/Pipfile'): ```toml [[source]] name = "pypi" url = "https://pypi.org/simple" verify_ssl = true [dev-packages] [packages] numpy = "*" scipy = "*" scikit-learn = "==0.19.1" statsmodels = "*" xgboost = "*" pystan = "*" fbprophet = "*" matplotlib = "==2.2.3" seaborn = "*" redis = "*" sqlalchemy = "*" mysqlclient = "*" pyarrow = "==0.11.1" hdfs = "*" hdfs3 = "*" s3fs = "*" python-dateutil = "*" chinesecalendar = "*" pandas = "*" h5py = "*" lxml = "*" openpyxl = "*" xlrd = "*" click = "*" pathlib2 = "*" python-dotenv = "*" environs = "*" joblib = "*" tqdm = "*" dask = {extras = ["complete"],version = "*"} [requires] python_version = "3.4" ```