(venv) C:\Users\IEUser\astpretty>virtualenv v -vvv --with-traceback
390 setup logging to NOTSET [DEBUG report:43]
468 could not create app data folder C:\Users\IEUser\AppData\Local\pypa\virtualenv due to FileNotFoundError(2, 'The system cannot find the path specified') [INFO app_data:54]
577 created temporary app data folder C:\Users\IEUser\AppData\Local\Temp\tmpaqvhomd3 [DEBUG app_data:32]
624 find interpreter for spec PythonSpec(path=c:\users\ieuser\astpretty\venv\scripts\python.exe) [INFO builtin:44]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\IEUser\astpretty\venv\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\__main__.py", line 50, in run_with_catch
run(args, options)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\__main__.py", line 20, in run
session = cli_run(args, options)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\run\__init__.py", line 27, in cli_run
session = session_via_cli(args, options)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\run\__init__.py", line 35, in session_via_cli
parser = build_parser(args, options)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\run\__init__.py", line 71, in build_parser
parser._interpreter = interpreter = discover.interpreter
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\discover.py", line 44, in interpreter
self._interpreter = self.run()
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\builtin.py", line 33, in run
return get_interpreter(self.python_spec, self.app_data.folder)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\builtin.py", line 46, in get_interpreter
for interpreter, impl_must_match in propose_interpreters(spec, app_data):
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\builtin.py", line 60, in propose_interpreters
yield PythonInfo.from_exe(spec.path, app_data), True
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\py_info.py", line 293, in from_exe
proposed = proposed._resolve_to_system(app_data, proposed)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\py_info.py", line 328, in _resolve_to_system
target = cls.from_exe(target.system_executable, app_data)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\py_info.py", line 290, in from_exe
proposed = from_exe(cls, app_data, exe, raise_on_error=raise_on_error, ignore_cache=ignore_cache)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\cached_py_info.py", line 32, in from_exe
result = _get_from_cache(cls, py_info_cache, app_data, exe, ignore_cache=ignore_cache)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\cached_py_info.py", line 56, in _get_from_cache
py_info = _get_via_file_cache(cls, py_info_cache, app_data, exe_path, exe)
File "c:\users\ieuser\astpretty\venv\lib\site-packages\virtualenv\discovery\cached_py_info.py", line 68, in _get_via_file_cache
resolved_path_modified_timestamp = resolved_path.stat().st_mtime
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1178, in stat
return self._accessor.stat(self)
OSError: [WinError 1920] The file cannot be accessed by the system: 'C:\\Users\\IEUser\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\python.exe'
Windows 10μμ Windows μ€ν μ΄ python 3.7.6μ μ¬μ©νκ³ μμ΅λλ€.
(venv) C:\Users\IEUser\astpretty>python --version --version
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 01:54:44) [MSC v.1916 64 bit (AMD64)]
λν μ€λ₯κ° λ°μνμ§ μκ³ μ΅μ
μ νμνκΈ° μν΄ --help
λ₯Ό μ€νν μ μμ΅λλ€.
@asottile μ¬νκ²λ CIμμ Windows μ€ν μ΄ νμ΄μ¬μ ν보νλ κ²μ λΆκ°λ₯ν©λλ€. λ΄κ° 보μ, κ·Έ PR μ§νμ ν¨κ³Όκ° μμλ€. κ·Έ κ²°μκ° μ¬κΈ° μΈμμ λ§μΉ κ² κ°κ΅°...
κ·Έλμ μ¬κΈ° λ²μΈμ λ€μκ³Ό κ°μ΅λλ€.
PS C:\Users\traveler\git\virtualenv> python -c 'import sys; from pathlib import Path; import os; print(sys.executable); print(os.path.exists(sys.executable)); print(Path(sys.executable).exists())'
C:\Users\traveler\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe
False
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1356, in exists
self.stat()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1178, in stat
return self._accessor.stat(self)
OSError: [WinError 1920] The file cannot be accessed by the system: 'C:\\Users\\traveler\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\python.exe'
κ·Έλμ μ°λ¦¬λ κ²½λ‘μ μ‘΄μ¬λ₯Ό νμΈν μΆ©λΆν κΆνμ΄ μμ§λ§ μ€νν μ μμ΅λλ€. pathlib
λ μμΈλ₯Ό λ°μμν€κ³ os.path.exists
λ μλ False
λ°νν©λλ€.
cc @zooba λλ μ΄κ²μ΄ μ€κ³λ λλ‘ μλν κ²μΌλ‘ κΈ°λν©λκΉ?
3.8μμ μμ λμμ΅λλ€. Windowsμμ μΆμ ν μ μκ³ μ½μ μ μλ μ¬λΆμ μ§μ (μ΄μ μλ μ€μ λ‘ μ‘΄μ¬ν μ μ΄ μμ)κ³Ό κΈ°ν μ¬λ¬ κ°μ§ κ²½μ°λ₯Ό μ²λ¦¬νκΈ° μν΄ stat()
λ₯Ό λ€μ μμ±νμ΅λλ€.
os.lstat()
λ Python 3.7μμ μλνλ―λ‘ μ΄λ₯Ό λμ μ¬μ©ν μ μλ λ°©λ²μ΄ μμΌλ©΄ μλν΄ λ³΄μΈμ. κ·Έλ μ§ μμΌλ©΄ μ€ν μ΄μμ Python 3.7μ λ²μλ₯Ό λ²μ΄λ¨/μ§μλμ§ μμμΌλ‘ μ μΈνμΈμ. κ·Έλμ "μ€νμ " νμλ₯Ό ν΄λμμ΅λλ€.
κ·Έλμ μ λ μ΄ κ²½μ°μ store python 3.7μ μμ νκ³ μΆμ΅λλ€. κ·Έλ¬λ λ΄κ° κ²ͺμ λ λ€λ₯Έ λ¬Έμ λ store python --symlinks
λ©μλκ° μ€νν μ μλ κ°μ νκ²½μ μμ±νλ€λ κ²μ
λλ€. μμ± μ€μ΄ μλλΌ μμ± νμλ§ μ€ν¨ν©λλ€.
μλ
νμΈμ, μ΄ λ¬Έμ μ λν μμ μ¬νμ΄ virtualenv 20.0.11μ ν΅ν΄ 릴리μ€λμμ΅λλ€. https://pypi.org/project/virtualenv/20.0.11/(https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-11-2020-03-18)μ μ°Έμ‘° νμμμ€ . μλν΄λ³΄κ³ λ¬Έμ κ° ν΄κ²°λμ§ μμ κ²½μ° λ€μ λ³΄κ³ νμμμ€. κ·Έλ μ§ μμ κ²½μ° μ¬κΈ°μ λκΈμ λ¬μμ£Όμλ©΄ ν°μΌμ λ€μ μ΄κ² μ΅λλ€. μ΄λ‘ μΈν΄ λΆνΈμ λλ € μ£μ‘νκ³ μ΄ μλ‘μ΄ μ£Όμ 릴리μ€λ‘ μκΈ°μΉ μμ λ²κ·Έλ₯Ό ν΄κ²°νλ λμ κΈ°λ€λ € μ£Όμ
μ κ°μ¬ν©λλ€.
κ°μ₯ μ μ©ν λκΈ
@asottile μ¬νκ²λ CIμμ Windows μ€ν μ΄ νμ΄μ¬μ ν보νλ κ²μ λΆκ°λ₯ν©λλ€. λ΄κ° 보μ, κ·Έ PR μ§νμ ν¨κ³Όκ° μμλ€. κ·Έ κ²°μκ° μ¬κΈ° μΈμμ λ§μΉ κ² κ°κ΅°...