我正在尝试写一个小脚本来管理我的Binance帐户,但我有一个库的问题。
我已经从这个存储库https://github.com/Binance-docs/Binance_Futures_python安装库“binance_f
该库已正确安装在默认系统环境和我创建的venv中。
我可以从python3.8 (系统或venv)控制台运行我的脚本,但不能从pycharm运行它。
来自venv:
(venv) herve@neon-herve:~/PycharmProjects/Script-Discord-Futures$ python3.8
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binance_f
>>> binance_f.__file__
'/home/herve/PycharmProjects/Script-Discord-Futures/venv/lib/python3.8/site-packages/binance_f/__init__.py'
>>>从系统环境:
herve@neon-herve:/usr/lib/python3/dist-packages/Binance_Futures_python-master$ python3.8
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binance_f
>>> binance_f.__file__
'/usr/lib/python3/dist-packages/Binance_Futures_python-master/binance_f/__init__.py'我尝试在我的PyCharm项目中使用venv或system env,但是失败了。
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/herve/PycharmProjects/Script-Discord-Futures/binance_functions.py", line 8, in <module>
import binance_f
ModuleNotFoundError: No module named 'binance_f'这是PyCharm中的解释器:
在Pycharm中,我尝试手动添加库,但收到一条错误消息。(我添加了存储库,并尝试安装"binance_f“。
我真的需要使用PyCharm来实现调试功能!
非常感谢你的帮助。
发布于 2021-10-10 16:10:14
https://stackoverflow.com/questions/69516237
复制相似问题