pipenv: error when i run pipenv install
1.environment: windows 2.python-version: 3.6.5
I’m through run pip install pipenv
install pipenv, but when i run pipenv install
it will error.
The error message is as follows:
pipenv install
Creating a virtualenv for this project…
Using d:\users\appdata\local\programs\python\python36\python.exe (3.6.5) to create virtualenv…
Already using interpreter d:\users\appdata\local\programs\python\python36\python.exe
Using base prefix 'd:\\users\\appdata\\local\\programs\\python\\python36'
New python executable in C:\Users\.virtualenvs\python-client-UUQ0goHc\Scripts\python.exe
Installing setuptools, pip, wheel...
Complete output from command C:\Users\.virtua...c\Scripts\python.exe - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "d:\users\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\users\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 2343, in <module>
main()
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 712, in main
symlink=options.symlink)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 947, in create_environment
download=download,
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 904, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\virtualenv.py", line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command C:\Users\.virtua...c\Scripts\python.exe - setuptools pip wheel failed with error code 1
Virtualenv location:
requirements.txt found, instead of Pipfile! Converting…
Traceback (most recent call last):
File "d:\users\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\users\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Users\AppData\Local\Programs\Python\Python36\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\cli.py", line 402, in install
selective_upgrade=selective_upgrade,
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\core.py", line 1781, in do_install
skip_requirements=skip_requirements,
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\core.py", line 650, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\core.py", line 281, in ensure_pipfile
project.create_pipfile(python=python)
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\project.py", line 601, in create_pipfile
required_python = self.which('python')
File "d:\users\appdata\local\programs\python\python36\lib\site-packages\pipenv\core.py", line 125, in which
os.path.join(location, 'Scripts'), command
File "d:\users\appdata\local\programs\python\python36\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
I was try use python3.5 and python3.7, but it also error.Can you help me? Thanks!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (7 by maintainers)
adding LANG environment variable fixes the issue for me. add these commands to you .bash_profile or bashrc file
export LC_ALL='en_US.UTF-8'
export LANG='en_US.UTF-8'
Make sure you have setuptools and wheel installed:
python -m pip install --upgrade setuptools wheel
Then you can upgrade pipenv:
python -m pip install --upgrade pipenv
Then try
pipenv install
again and let us know if you continue to have issues.LANG
isn’t set in those outputs… have you all considered setting theLANG
environment variable? There are quite a few issues around this –https://pipenv.readthedocs.io/en/latest/diagnose/#valueerror-unknown-locale-utf-8 https://github.com/pypa/pipenv/issues/187
Running pipenv install in a Dockerfile file (CentOS 7.1 based) when
--system
flag is set:RUN pipenv install --deploy --system
But succeeds without the
--system
flag:RUN pipenv install --deploy
Env variables are set: