每次在 VSCode 上启动终端时,都会收到以下提示。Terminal.app 上不会发生这种情况。
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip
and other standards-based tools.
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
我们有多个 python 项目,正在考虑将它们转换为使用pyproject.toml而不是setup.py.
有没有一种简单的方法可以自动执行此操作?
我刚刚运行了"pip install -U steem"命令,安装工作正常,直到它无法安装pycrypto.之后我做了"pip install cryptography"命令,因为我认为它是缺少的包.所以我的问题是,如何在没有pycrypto-error(或者另外还有pycrypto-package)的情况下安装steem,以及如何卸载我不需要的cryptography-Package.(我使用的是Windows 7和Python 3)
Requirement already up-to-date: python-dateutil in c:\users\***\appdata\lo
cal\programs\python\python36\lib\site-packages (from dateparser->maya->steem)
Collecting regex (from dateparser->maya->steem)
Downloading regex-2017.06.23-cp36-none-win_amd64.whl (245kB)
100% |????????????????????????????????| 245kB 499kB/s
Collecting pytzdata (from pendulum->maya->steem)
Downloading pytzdata-2017.2-py2.py3-none-any.whl (462kB)
100% |????????????????????????????????| 471kB 965kB/s
Installing collected packages: urllib3, idna, chardet, certifi, requests, pycryp
to, funcy, w3lib, voluptuous, diff-match-patch, scrypt, prettytable, appdirs, la
ngdetect, ruamel.yaml, humanize, tzlocal, regex, dateparser, pytzdata, pendulum,
maya, ecdsa, pylibscrypt, ujson, toolz, steem
Running setup.py install for pycrypto ... error
Complete output …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Python 上安装一个包,但 Python 在安装包时抛出错误。每次尝试安装时都会出现错误pip install google-search-api。
这是错误我怎样才能成功安装它?
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Run Code Online (Sandbox Code Playgroud)
我已经更新了它并拥有 14.27 的最新版本,但问题是抛出相同的错误。
我目前正在尝试将我们的内部项目从setup.py( pyproject.tomlPEP -518 ) 移走。如果可能的话,我不想使用构建后端特定的配置,即使我确实[build-system]通过require“ing”在该部分中指定了后端。
这些pyproject.toml文件或多或少是setup.py文件的直接翻译,元数据根据PEP-621设置,包括dependencies. 我们用于setuptools_scm确定版本,因此该version字段最终位于该dynamic部分中。
我们曾经在文件中设置packages参数,但我在 中找不到任何相应的字段,所以我干脆省略了它。setupsetup.pypyproject.toml
当使用 构建项目时python3 -m build .,我最终得到一个名为 的包UNKNOWN,即使我name在[project]部分中设置了字段。看来这在构建的早期就中断了:
$ python -m build .
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (setuptools, setuptools_scm[toml]>=6.2, wheel)
* Getting dependencies for sdist...
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
....
Run Code Online (Sandbox Code Playgroud)
我正在使用 python …