简体   繁体   English

没有Anaconda的Spyder安装

[英]Spyder installation without Anaconda

I already have Python 3.6 (32-bit) on Windows 7. Is there a way to install Spyder without downloading Anaconda, WinPython, etc. ?我已经在 Windows 上安装了 Python 3.6(32 位) 7. 有没有办法不用下载 Anaconda、WinPython 等就可以安装 Spyder?

You need to run the following commands in order to install and run the Spyder3 without anaconda: 您需要运行以下命令才能在没有anaconda的情况下安装和运行Spyder3

 1. python -m pip install pyqt5
 2. python -m pip install spyder
 3. python -m pip install PyQtWebEngine
 4. spyder3 (to launch spyder)

Package in point 3 also needs to be installed explicitly. 第3点中的包也需要明确安装。

You need to run in a system terminal ( cmd.exe ) these commands 您需要在系统终端( cmd.exe )中运行这些命令

pip install spyder
pip install pyqt5

However, please be aware that this kind of installation is not recommended for beginners, but only for very knowledgeable programmers, because if errors appear during the installation, you need to know very well all Spyder dependencies to solve them. 但请注意,建议不要为初学者安装此类安装,但仅限于知识渊博的程序员,因为如果在安装过程中出现错误,您需要非常了解所有Spyder依赖项才能解决这些问题。

Installation Spyder Install Spyder and its other dependencies, run pip install spyder . 安装Spyder安装Spyder及其他依赖项,运行pip install spyder You may need to install a Qt binding (PyQt5) separately with pip if running under Python 2 如果在Python 2下运行,您可能需要使用pip单独安装Qt绑定(PyQt5)

Launch Spyder To launch Sypder go to your Python installation directory. 启动Spyder要启动Sypder,请转到Python安装目录。 in my case C:\\Program Files (x86)\\Python\\Scripts 在我的情况下C:\\ Program Files(x86)\\ Python \\ Scripts

Launch spyder3.exe 启动spyder3.exe

他们最近为 Mac 和 Windows 提供了独立安装程序,包括“精简版”版本。

I've struggled a lot on this on Windows. This is what I did and worked clean (without Python, Anaconda or Spyder allready installed - if any allready installed uninstalit).我在 Windows 上为此苦苦挣扎。这就是我所做的并且工作得很干净(没有 Python、Anaconda 或 Spyder 已安装 - 如果已安装 uninstalit)。 The following worked today but, I'll think, it will be ok in the near future too.以下内容今天有效,但我认为,在不久的将来也可以。

  1. Install PYTHON exe https://www.python.org/ftp/python/3.9.10/python-3.9.10-amd64.exe安装PYTHON exe https://www.python.org/ftp/python/3.9.10/python-3.9.10-amd64.exe

  2. Install SPYDER exe https://github.com/spyder-ide/spyder/releases/latest/download/Spyder_64bit_full.exe安装SPYDER exe https://github.com/spyder-ide/spyder/releases/latest/download/Spyder_64bit_full.exe

  3. In Spyder, change the Interpreter:在 Spyder 中,更改解释器:

Tools -> Preferences -> Use the following Python interpreter: (myne is C:\Program Files\Python39\python.exe)工具 -> 首选项 -> 使用以下 Python 解释器:(我的是 C:\Program Files\Python39\python.exe)

Hit Apply, hit OK.点击应用,点击确定。

  1. Close and open Spyder关闭并打开 Spyder

You will receive a message like this:您将收到如下消息:

The Python environment or installation whose interpreter is located at C:\Program Files\Python39\python.exe doesn't have the spyder kernels module or the right version of it installed (>= 2.2.1 and < 2.3.0).解释器位于 C:\Program Files\Python39\python.exe 的 Python 环境或安装没有安装 spyder 内核模块或其正确版本(>= 2.2.1和 < 2.3.0)。 Without this module is not possible for Spyder to create a console for you.没有这个模块,Spyder 就不可能为您创建控制台。 You can install it by activating your environment (if necessary) and then running in a system terminal: conda install spyder kernels=2.2 or pip install spyder kernels==2.2.您可以通过激活环境(如有必要)然后在系统终端中运行来安装它:conda install spyder kernels=2.2 或 pip install spyder kernels==2.2。

Remember this from above: ( >= 2.2.1 and < 2.3.0)从上面记住这一点: > = 2.2.1和 < 2.3.0)

  1. Close Spyder and do in CMD:关闭 Spyder 并在 CMD 中执行:

pip install spyder-kernels== 2.2.1 pip 安装 spyder-kernels== 2.2.1

  1. Some test:一些测试:

In Spyder:在 Spyder 中:

import pandas as pd

It's OK error: ModuleNotFoundError: No module named 'pandas'没关系错误: ModuleNotFoundError:没有名为'pandas'的模块

In CMD: pip install pandas在 CMD: pip 安装 pandas

After that, in Spyder:之后,在 Spyder 中:

import pandas as pd
print(pd.__version__)
1.4.1

If no errors occurs and some version appears, than Python and Spyder work together.如果没有错误发生并且出现了一些版本,那么 Python 和 Spyder 一起工作。 End of test.测试结束。

According to the Sypder-Docs , After installing the Python, run the following command: 根据Sypder-Docs ,安装Python后,运行以下命令:

pip install PyQt5 Qtconsole Rope Pyflakes Sphinx Pygments Pylint Pycodestyle Psutil Nbconvert Qtawesome Pickleshare PyZMQ QtPy Chardet Numpydoc Cloudpickle PyQtWebEngine spyder 

(Do not use "3" in front of spyder in pip install). (请勿在pip安装中使用“3”前面的spyder)。 After that, run it by typing in spyder3 in command window (Here "3" is required) 之后,在命令窗口输入spyder3来运行它(这里需要“3”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM