gpt4 book ai didi

python - 在 Windows 上激活 Python 虚拟环境

转载 作者:可可西里 更新时间:2023-11-01 10:02:51 24 4
gpt4 key购买 nike

<分区>

注意:人们将此标记为与另一个问题重复,但事实并非如此。我的 virtualenv 有问题,我无法解决它。这可能与 Visual Studio 的设置方式有关。

我一直在关注这个优秀的 tutorial on flask

我尝试在 Windows 上激活虚拟环境时遇到问题。你如何执行$ venv\Scripts\activate?这应该来自命令提示符还是 Powershell?我使用 Visual Studio 作为我的 IDE。它为您创建了一个 VS 解决方案,该解决方案具有一个基本的 flask 应用程序。在创建应用程序的过程中,它会要求您创建一个虚拟环境。它在类似于教程中显示的目录中创建该虚拟环境。 \venv\Scripts 退出但它没有名为“activate”的文件或可执行文件。

这是脚本文件夹的内容:

api-ms-win-core-console-l1-1-0.dll api-ms-win-core-datetime-l1-1-0.dll

api-ms-win-core-debug-l1-1-0.dll

api-ms-win-core-errorhandling-l1-1-0.dll

api-ms-win-core-file-l1-1-0.dll api-ms-win-core-file-l1-2-0.dll

api-ms-win-core-file-l2-1-0.dll api-ms-win-core-handle-l1-1-0.dll

api-ms-win-core-heap-l1-1-0.dll api-ms-win-core-interlocked-l1-1-0.dll

api-ms-win-core-libraryloader-l1-1-0.dll

api-ms-win-core-localization-l1-2-0.dll

api-ms-win-core-memory-l1-1-0.dll api-ms-win-core-namedpipe-l1-1-0.dll

api-ms-win-core-processenvironment-l1-1-0.dll

api-ms-win-core-processthreads-l1-1-0.dll

api-ms-win-core-processthreads-l1-1-1.dll

api-ms-win-core-profile-l1-1-0.dll

api-ms-win-core-rtlsupport-l1-1-0.dll

api-ms-win-core-string-l1-1-0.dll api-ms-win-core-synch-l1-1-0.dll

api-ms-win-core-synch-l1-2-0.dll api-ms-win-core-sysinfo-l1-1-0.dll

api-ms-win-core-timezone-l1-1-0.dll api-ms-win-core-util-l1-1-0.dll

api-ms-win-crt-conio-l1-1-0.dll api-ms-win-crt-convert-l1-1-0.dll

api-ms-win-crt-environment-l1-1-0.dll

api-ms-win-crt-filesystem-l1-1-0.dll api-ms-win-crt-heap-l1-1-0.dll

api-ms-win-crt-locale-l1-1-0.dll api-ms-win-crt-math-l1-1-0.dll

api-ms-win-crt-multibyte-l1-1-0.dll api-ms-win-crt-private-l1-1-0.dll

api-ms-win-crt-process-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll

api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-string-l1-1-0.dll

api-ms-win-crt-time-l1-1-0.dll api-ms-win-crt-utility-l1-1-0.dll

concrt140.dll msvcp140.dll pyexpat.pyd python.exe python3.dll

python36.dll pythoncom36.dll pythonw.exe pywintypes36.dll select.pyd

sqlite3.dll tcl86t.dll tk86t.dll ucrtbase.dll unicodedata.pyd

vccorlib140.dll vcomp140.dll vcruntime140.dll winsound.pyd

xlwings32.dll xlwings64.dll

_asyncio.pyd

_bz2.pyd

_ctypes.pyd

_ctypes_test.pyd

_decimal.pyd

_elementtree.pyd

_hashlib.pyd

_lzma.pyd

_msi.pyd

_multiprocessing.pyd

_overlapped.pyd

_socket.pyd

_sqlite3.pyd

_ssl.pyd

_testbuffer.pyd

_testcapi.pyd

_testconsole.pyd

_testimportmultiple.pyd

_testmultiphase.pyd

_tkinter.pyd

我一路走到了data migration section但在这里我需要运行 (venv) $ flask db migrate

我不知道如何进入虚拟环境来运行它。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com