---
slug: "pipenv-instal-runtimeerror-location-not-created-nor-specified-resolve"
title: "If \"pipenv install\" Results in RuntimeError: location not created nor specified"
description: "Fix `pipenv install` failing with `RuntimeError: location not created nor specified` — remove the venv with `pipenv --rm` and let pipenv recreate it."
url: "https://www.ytyng.com/en/blog/pipenv-instal-runtimeerror-location-not-created-nor-specified-resolve"
publish_date: "2022-09-05T00:49:49Z"
created: "2022-09-05T00:49:49Z"
updated: "2026-05-11T13:14:10.564Z"
categories: ["Python"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/4d9f8c81973e4c3dadd339161add1641.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# If "pipenv install" Results in RuntimeError: location not created nor specified

<p>When trying to create a Python 3.10 environment with pipenv install</p>
<p></p>
<pre>% pipenv install<br />...<br />...<br />Traceback (most recent call last):<br /> File "/usr/local/bin/pipenv", line 8, in &lt;module&gt;<br /> sys.exit(cli())<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 829, in __call__<br /> return self.main(*args, **kwargs)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 782, in main<br /> rv = self.invoke(ctx)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke<br /> return _process_result(sub_ctx.command.invoke(sub_ctx))<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke<br /> return ctx.invoke(self.callback, **ctx.params)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 610, in invoke<br /> return callback(*args, **kwargs)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func<br /> return ctx.invoke(f, obj, *args, **kwargs)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 610, in invoke<br /> return callback(*args, **kwargs)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func<br /> return f(get_current_context(), *args, **kwargs)<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/cli/command.py", line 233, in install<br /> retcode = do_install(<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/core.py", line 1920, in do_install<br /> ensure_project(<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/core.py", line 585, in ensure_project<br /> path_to_python = which("python") or which("py")<br /> File "/usr/local/lib/python3.9/site-packages/pipenv/core.py", line 97, in which<br /> raise RuntimeError("location not created nor specified")<br />RuntimeError: location not created nor specified</pre>
<p>in case it happens.</p>
<p></p>
<p>If your PC has multiple Python environments, pip and pipenv are installed for each environment.</p>
<p>To check which version of pip is running with the simple pip command,</p>
<pre>% cat $(which pip)</pre>
<p>and check the first line of the shebang.</p>
<pre>% cat $(which pip)<br />#!/usr/local/opt/python@3.9/bin/python3.9<br /># -*- coding: utf-8 -*-<br />import re<br />import sys<br />...</pre>
<pre>% cat $(which pipenv)<br />#!/usr/local/opt/python@3.9/bin/python3.9<br /># -*- coding: utf-8 -*-<br />import re<br />import sys<br />...</pre>
<p><br />This time, the error occurred while trying to create a Python 3.10 venv with pipenv in the Python 3.9 environment.</p>
<p><br />To run pip or pipenv in a specified Python environment, use the <strong>-m</strong> option.</p>
<ul>
<li>Instead of pip install ..., use python3.10 -m pip install ...</li>
<li>Instead of pipenv install ..., use python3.10 -m pipenv install ...</li>
</ul>
<p>This time, since I wanted to run pipenv in the Python 3.10 environment when pipenv is typed, I installed pipenv in Python 3.10.</p>
<pre>% python3.10 -m pip install pipenv</pre>
<p>After installation</p>
<pre>% cat $(which pipenv)<br />#!/usr/local/opt/python@3.10/bin/python3.10<br /># -*- coding: utf-8 -*-<br />import re<br />import sys<br />from pipenv import cli<br />if __name__ == '__main__':<br />    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])<br />    sys.exit(cli())</pre>
