简体   繁体   English

使用 Spyder 安装和使用 npTDMS - anaconda3

[英]Installing and using npTDMS with Spyder - anaconda3

I have successfully installed npTDMS as seen here: https://pypi.org/project/npTDMS/我已经成功安装了 npTDMS,如下所示: https://pypi.org/project/npTDMS/

If I try to install with command line using either pip or conda I get a message confirming it is already installed, and I see the package at D:\Users\username\anaconda3\pkgs .如果我尝试使用 pip 或 conda 使用命令行安装,我会收到一条消息,确认它已安装,并且我在D:\Users\username\anaconda3\pkgs看到 package。

On Spyder I have tried using the PYTHON path manager (in the tools menu) to add both:在 Spyder 上,我尝试使用 PYTHON 路径管理器(在工具菜单中)添加两者:

D:\Users\username\anaconda3\pkgs\nptdms-1.2.0-pyhd8ed1ab_0
D:\Users\username\anaconda3\pkgs\nptdms-1.2.0-pyhd8ed1ab_0\site-packages\nptdms

As far as I understand this should be enough to use the npTDMS package, however when I try to import I get a ModuleNotFoundError: No module named 'nptdms' .据我了解,这应该足以使用 npTDMS package,但是当我尝试导入时,我得到一个ModuleNotFoundError: No module named 'nptdms'

I'm fairly new to python overall so maybe there is a simple thing I am missing.总的来说,我对 python 还是很陌生,所以我可能缺少一件简单的事情。

This issue comes when there are multiple versions of python or any package you are running at current time.当有多个版本的 python 或您当前正在运行的任何 package 时,就会出现此问题。 The same issue was with me too when the IDLE was not able to detect the position of where the package is installed.当 IDLE 无法检测到安装了 package 的 position 时,我也遇到了同样的问题。

My suggestion is that uninstall all the versions of python and the module you are using and install them again.我的建议是卸载所有版本的 python 和您正在使用的模块并重新安装它们。 Otherwise shift to any other IDLE, in my recommendation - Visual Studio Code.否则,在我的建议中转移到任何其他 IDLE - Visual Studio Code。

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

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