[英]Manually/locally installed python packages dont show up in visual studio
So I manually installed a locally downloaded python package by going into the folder directory and using the cmd command:因此,我通过进入文件夹目录并使用 cmd 命令手动安装了本地下载的 python package:
python setup.py install
After that it just installed itself normally.之后它就正常安装了。 Using the python function
help("modules")
in cmd also confirmed that it was installed correctly as I can see the name being given out.在 cmd 中使用 python function
help("modules")
也确认它已正确安装,因为我可以看到给出的名称。 The two modules are called binance_d
and binance_f
这两个模块被称为
binance_d
和binance_f
C:\Users\Hungti>python
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")
Please wait a moment while I gather a list of all available modules...
File "C:\Users\Hungti\AppData\Local\Programs\Python\Python39\lib\site-packages\autobahn\xbr\__init__.py", line 38, in <module>
from mnemonic import Mnemonic
No module named 'mnemonic'C:\Users\Hungti\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
warnings.warn(
OpenSSL antigravity gettext requests_toolbelt
__future__ apprise glob rlcompleter
_abc apscheduler graphlib runpy
_aix_support argparse greenlet sched
_ast array gunicorn schedule
_asyncio ast gzip secrets
_bisect asynchat hashlib select
_blake2 asyncio heapq selectors
_bootlocale asyncore hmac service_identity
_bootsubprocess atexit html setuptools
_bz2 attr http shelve
_cffi_backend audioop hyperlink shlex
_codecs autobahn idlelib shutil
_codecs_cn automat idna signal
_codecs_hk base64 imaplib site
_codecs_iso2022 bdb imghdr six
_codecs_jp bidict imp smtpd
_codecs_kr binance importlib smtplib
_codecs_tw binance_d incremental sndhdr
_collections binance_f ingenico socket
_collections_abc binascii inspect socketio
_compat_pickle binhex io socketserver
_compression bisect ipaddress sqlalchemy
_contextvars builtins itertools sqlite3
_csv bz2 itsdangerous sqlitedict
_ctypes cProfile jinja2 sre_compile
_ctypes_test cachetools json sre_constants
_datetime calendar keyword sre_parse
_decimal certifi lib2to3 ssl
_elementtree cffi linecache stat
_functools cgi locale statistics
_hashlib cgitb logging string
_heapq chardet lzma stringprep
_imp chunk mailbox struct
_io click mailcap subprocess
_json cmath markdown sunau
_locale cmd markupsafe symbol
_lsprof code marshal symtable
_lzma codecs math sys
_markupbase codeop mimetypes sysconfig
_md5 collections mmap tabnanny
_msi colorsys modulefinder tarfile
_multibytecodec compileall msilib telnetlib
_multiprocessing concurrent msvcrt tempfile
_opcode configparser multiprocessing test
_operator constantly netrc textwrap
_osx_support contextlib nntplib this
_overlapped contextvars nt threading
_peg_parser copy ntpath time
_pickle copyreg nturl2path timeit
_py_abc crypt numbers tkinter
_pydecimal cryptography numpy token
_pyio csv oauthlib tokenize
_queue ctypes opcode trace
_random curses operator traceback
_sha1 dataclasses optparse tracemalloc
_sha256 dateparser os tty
_sha3 dateparser_data parser turtle
_sha512 dateparser_scripts pathlib turtledemo
_signal datetime pdb twisted
_sitebuiltins dateutil pickle txaio
_socket dbm pickletools types
_sqlite3 decimal pip typing
_sre difflib pipes tzlocal
_ssl dis pkg_resources ujson
_stat distutils pkgutil unicodedata
_statistics dns platform unittest
_string doctest plistlib urllib
_strptime easy_install poplib urllib3
_struct email posixpath uu
_symtable encodings pprint uuid
_testbuffer engineio profile venv
_testcapi ensurepip pstats warnings
_testconsole enum pty wave
_testimportmultiple errno py_compile weakref
_testinternalcapi eventlet pyasn1 webbrowser
_testmultiphase faulthandler pyasn1_modules websocket
_thread filecmp pyclbr werkzeug
_threading_local fileinput pycparser winreg
_tkinter flask pydoc winsound
_tracemalloc flask_cors pydoc_data wsgiref
_uuid flask_socketio pyexpat xdrlib
_warnings fnmatch pytz xml
_weakref formatter queue xmlrpc
_weakrefset fractions quopri xxsubtype
_winapi ftplib random yaml
_xxsubinterpreters functools re zipapp
_yaml gc regex zipfile
_zoneinfo genericpath reprlib zipimport
abc getopt requests zlib
aifc getpass requests_oauthlib zoneinfo
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
However when I go to Visual Studio and try to import this package it doesn't show up.但是,当我将 go 导入 Visual Studio 并尝试导入此 package 时,它不会出现。 Whereas other packages I have installed "automatically" do, I would appreciate any help you can offer me, thanks a lot!
尽管我已经“自动”安装了其他软件包,但如果您能提供任何帮助,我将不胜感激,非常感谢!
I followed this document and I can get what I want.我按照这个文件,我可以得到我想要的。 The most importance thing is that the command does not copy the generated files into the pyhton 3.9.4 folder automatically.
最重要的是该命令不会自动将生成的文件复制到 pyhton 3.9.4 文件夹中。 You have to copy them manually.
您必须手动复制它们。
1) first download the project under this link and then unpack the file. 1)首先下载这个链接下的项目,然后解压文件。
Run these under cmd:在 cmd 下运行这些:
cd xxx\xxx\Binance_Futures_python-master`
C:\Users\xxx\AppData\Local\Programs\Python\Python39\python.exe setup.py install
After that , copy the changed two folders binance_d
and binance_f
from Binance_Futures_python-master
folder into C:\Users\xxx\AppData\Local\Programs\Python\Python39\Lib\site-packages
之后,将更改后的两个文件夹
binance_d
和binance_f
从Binance_Futures_python-master
文件夹复制到C:\Users\xxx\AppData\Local\Programs\Python\Python39\Lib\site-packages
Then , close VS, restart VS and choose the right python 3.9 as python environment.然后,关闭VS,重启VS,选择正确的python 3.9作为python环境。 Then type the code and you will get what you want.
然后输入代码,你会得到你想要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.