推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yellowtail
V2EX  ›  Python

为什么用 cmd 里输入 import visa 有效,但是在 pycharm 里输入 import visa 就没有这个库呢?

  •  
  •   yellowtail · Feb 5, 2018 · 4209 views
    This topic created in 3036 days ago, the information mentioned may be changed or developed.
    很小白的问题,完全是一个人自学摸索所以很多都不是很明白。最近在尝试用 pyvisa 来控制仪器,测出同一时间下的不同读数,但是不懂 scpi 命令现在还只学会怎么设置仪器,不知道如何处理仪器的读数。希望大家可以提供一些建议,不胜感激~
    6 replies    2018-02-06 16:33:55 +08:00
    Mark24
        1
    Mark24  
       Feb 5, 2018
    你用的是不是 PycharmCE 社区版?
    社区版可能不会主动检索一些库。。。我忘了

    如果是 Pycharm Pro 的话,是不是解释器没配对,是本地生成了一个呢,还是选择了系统的那个。

    cmd 里可以导入,说明是系统预装的。Pycharm 新建项目的时候要选择一个解释器,你可能选成本地虚拟出一个。
    yellowtail
        2
    yellowtail  
    OP
       Feb 5, 2018
    @Mark24 谢谢 我用的 pycharm edu 我试了一下 发现笔记本可以...
    mosliu
        3
    mosliu  
       Feb 5, 2018
    pycharm 的话
    是不是用了 venv 了?
    cxbig
        4
    cxbig  
       Feb 5, 2018
    PyCharm 里要配置 Python 版本和路径啊,是按项目(Project)分离的,不同的项目可以配置不同的版本。
    cominghome
        5
    cominghome  
       Feb 6, 2018
    楼上正解,没配置正确的 python 路径
    yellowtail
        6
    yellowtail  
    OP
       Feb 6, 2018
    谢谢大家 虽然没有找到原因 解释器的设置选项是 no interpreter 经过提醒后 在建立新项目时的具体选择包括了所有 site-package 就能用了 谢谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2778 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 02:43 · PVG 10:43 · LAX 19:43 · JFK 22:43
    ♥ Do have faith in what you're doing.