selfteaching / selfteaching/selfteaching-python-camp

【方法分享】 windows环境配置让anaconda的命令在cmd中能够运行

Open
#1,835 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

学习素材分享
Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

使用windows的用户可能都会碰到这样一个问题,想要在cmd或者vscode中直接用jupyter lab、pip等命令时,总是返回错误。例如你直接在cmd中输入jupyter lab的时候,系统会返回“jupyter lab不是内部命令或者外部命令,也不是可运行的命令。”

系统cmd

之所以出现这样的错误是因为没有进行windows的环境配置,没有把anaconda命令加入windows可运行的命令。我们只需要在windows中这样设置一下就行了。

直接在开始里面搜索系统环境变量,然后点击编辑系统环境变量。(我的系统是win10,其他系统win7或者8同理

搜索系统环境变量

然后选中Paht这一项,接着点击编辑

环境变量编辑

然后加入anaconda的地址进去,如下图所示 (注意是自己系统里面anaconda的目录地址

加入地址

然后你就可以愉快的在cmd中或者vscode中打开的terminal中运行jupyter lab命令了。在vscode中运行terminal有个好处是可以多开,这样就不会由烦恼打开了一大推窗口了。

运行命令

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Windows PATH, Anaconda, Jupyter Lab, pip, and VS Code terminal steps described in the issue, including the linked screenshots. Confirm that the commands and environment-variable instructions still match current Windows and Anaconda behavior; done means the guide is accurate and reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, jupyter-notebook, python, vscode
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.