question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv can't create when python in a readonly folder

See original GitHub issue

I use the Python from MS Store. And when i used ‘pipenv install’, have error Failed creating virtual environment [pipenv.exceptions.VirtualenvCreationException]: File "C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pipenv\cli\command.py", line 254, in install [pipenv.exceptions.VirtualenvCreationException]: editable_packages=state.installstate.editables, [pipenv.exceptions.VirtualenvCreationException]: File "C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pipenv\core.py", line 1741, in do_install [pipenv.exceptions.VirtualenvCreationException]: pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pipenv\core.py", line 574, in ensure_project [pipenv.exceptions.VirtualenvCreationException]: pypi_mirror=pypi_mirror, [pipenv.exceptions.VirtualenvCreationException]: File "C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pipenv\core.py", line 506, in ensure_virtualenv [pipenv.exceptions.VirtualenvCreationException]: python=python, site_packages=site_packages, pypi_mirror=pypi_mirror [pipenv.exceptions.VirtualenvCreationException]: File "C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pipenv\core.py", line 935, in do_create_virtualenv [pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue("{0}".format(c.err)),] [pipenv.exceptions.VirtualenvCreationException]: Failed to create virtual environment.

Then I use ‘python -m venv .venv’ create a new venv, and active this. command ‘pipenv install’ work well. Should pipenv can run if python in a readonly folder? and how could I fix it.

> pipenv --support | clip

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: 'C:\\Users\\***\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\pipenv'

Python location: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.752.0_x64__qbz5n2kfra8p0\\python.exe'

Python installations found:

  • 3.7.2: C:\Users\***\AppData\Local\Microsoft\WindowsApps\python.exe
  • 3.7.2: C:\Users\***\AppData\Local\Microsoft\WindowsApps\python3.7.exe
  • 3.7.2: C:\Users\***\AppData\Local\Microsoft\WindowsApps\python3.exe
  • 3.7.2: C:\Users\***\AppData\Local\Microsoft\WindowsApps\pythonw.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.2',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.17763',
 'python_full_version': '3.7.2',
 'python_version': '3.7',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • APPDATA
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • DRIVERDATA
  • HOMEDRIVE
  • HOMEPATH
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • ONEDRIVE
  • OS
  • PATH
  • PATHEXT
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PSMODULEPATH
  • PUBLIC
  • SESSIONNAME
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • WINDIR
  • PYTHONUSERBASE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv?specific environment variables:

Debug?specific environment variables:

  • PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\***\AppData\Local\Microsoft\WindowsApps;C:\Users\***\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts;

Contents of Pipfile (‘C:\Users\***\PycharmProjects\untitled2\Pipfile’):


Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
frostmingcommented, Mar 8, 2019

Good to know someone is using Python from the MS store.

0reactions
matteiuscommented, Mar 13, 2022

Closing this down as the original reporter is a ghost account now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv not creating Pipfile and not creating environment in ...
I'm trying to use pipenv to create a virtual environment for my python program. I have a folder on my desktop (we'll call...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
This document covers some of Pipenv's more glorious and advanced features. ... This will fail a build if the Pipfile.lock is out–of–date, instead...
Read more >
pipenv Documentation - Read the Docs
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
pipenv Documentation
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
Python Virtual Environments - Office of Research Computing
The only difference between these two methods is that virtualenv copies the Python executables into the Virtual Environment folder and venv does not....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found