What is the difference between PyCharm Virtual Environment and Anaconda Environment?

前端 未结 2 1965
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 17:55

When I create a new project in PyCharm, it creates a new Virtual Environment. I have read that when I execute Python scripts, they are executed using the interpreter in this env

2条回答
  •  天涯浪人
    2021-01-30 18:30

    Both environments are based on python's virtualenv, you can use them independently and configure (or install) packages inside it as you need, without the worry of conflicts. This is the essence of virtualenv.

    Anaconda is a python distribution (just like linux distros) it by default add other packages based of it's opinion of what developers need. Hence, the installation is larger than if you install plain vanilla python. This is also why it's virtual environment is quite large.

    Pycharm is an IDE, which happens to support the virtualenv feature of python. So it can create it for you, if you wish. It can use plain python distro to create it, so this will have a smaller size than if it uses a distro like Anaconda, as you have noticed.

    The size issue is not specific to Anaconda, if you list all packages installed for you by anaconda conda list and install it manually yourself in the "lightweight" virtualenv you will see the size go up too. I believe you get my point.

提交回复
热议问题