我已经安装了Python 3.5并且在运行时
pip install mysql-python
Run Code Online (Sandbox Code Playgroud)
它给了我以下错误
error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
Run Code Online (Sandbox Code Playgroud)
我在路径中添加了以下行
C:\Program Files\Python 3.5\Scripts\;
C:\Program Files\Python 3.5\;
C:\Windows\System32;
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
Run Code Online (Sandbox Code Playgroud)
我的PC上有64位win 7设置.
什么是解决此错误和正确安装模块的解决方案pip.
我已经阅读了所有其他谷歌来源和SO线程,没有任何工作.
Python 2.7.3 32bit安装上Windows 7 64bit.下载,解压缩,然后尝试安装PyCrypto结果"Unable to find vcvarsall.bat".
所以我安装MinGW并在安装行上将其作为首选编译器.但后来我得到了错误"RuntimeError: chmod error".
我怎么在世界上绕过这个?我尝试过使用pip,它给出了相同的结果.我找到了一个预先构建的PyCrypto 2.3二进制文件并安装了它,但它在系统上找不到(不工作).
有任何想法吗?
我在网上搜索过,找不到任何与我的问题相似的内容.
我创建了一个空的C++项目,并添加了一个返回的main.cpp,我无法构建它.这是我收到的消息:
1>------ Build started: Project: Project1, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1158: cannot run 'rc.exe'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Run Code Online (Sandbox Code Playgroud)
在VS2012中有什么地方我可以指定在哪里找到这个可执行文件吗?我已经安装了Windows 7 SDK,我有以下可执行文件:
C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin
Run Code Online (Sandbox Code Playgroud)
我来自Code :: Blocks并毫不费力地使用mingw-gcc,但最近我一直需要VS来实现托管实现,所以我希望有人有个主意.
我在Windows 10机器上,最近从python 2.7移动到3.5.当尝试通过pip安装lxml时,它会停止并抛出此错误消息 -
构建'lxml.etree'扩展
错误:需要Microsoft Visual C++ 14.0.使用"Microsoft Visual C++构建工具"获取它:http://landinghub.visualstudio.com/visual-cpp-build-tools
我安装了VS 2015的工作副本.当我尝试通过该链接安装visual cpp工具时,它表示已在计算机上安装了Microsoft Visual Studio 2015.我还尝试安装64位和32位版本的visual studio c ++ 2015可再发行组件,但他们都说已经安装了另一个版本的产品.
在命令提示符中键入set包括此 -
VS140COMNTOOLS = C:\ Program Files(x86)\ Microsoft Visual Studio 14.0\Common7\Tools \
这意味着路径已设置.
这可能是我在SO上找到的唯一资源,但答案建议从3.5回滚到Python 3.4.3.有人解决了这种问题吗?
需要Microsoft Visual C++ 14.0(无法找到vcvarsall.bat)
编辑:我设法使用预编译的二进制文件(感谢Paul)安装它,但我仍然想知道是什么导致了这一点.
由于某种原因,pycharm 中的解释器配置无效,因此我为我正在处理的项目创建了一个新的虚拟环境,并再次安装了依赖项。但是我在再次安装 bcrypt 时遇到了麻烦。这是完整的错误。该项目在以前的解释器上运行良好,所以我怀疑 python 版本与它有什么关系。我尝试安装轮子以及错误所说的那样,could not build wheels但这也没有起到作用。
完整的错误:
Collecting flask-bcrypt
Using cached https://files.pythonhosted.org/packages/1d/c0/6d4c04d007d72b355de24e7a223978d1a95732245f
9e9becbf45d3024bf8/Flask-Bcrypt-0.7.1.tar.gz
Requirement already satisfied: Flask in c:\users\User\appdata\local\programs\python\python38-3
2\lib\site-packages (from flask-bcrypt) (1.1.2)
Collecting bcrypt (from flask-bcrypt)
Using cached https://files.pythonhosted.org/packages/d8/ba/21c475ead997ee21502d30f76fd93ad8d5858d19a3
fad7cd153de698c4dd/bcrypt-3.2.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: Jinja2>=2.10.1 in c:\users\User\appdata\local\programs\python\p
ython38-32\lib\site-packages (from Flask->flask-bcrypt) (2.11.2)
Requirement already satisfied: Werkzeug>=0.15 in c:\users\User\appdata\local\programs\python\p
ython38-32\lib\site-packages (from Flask->flask-bcrypt) (1.0.1)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\User\appdata\local\programs\pyth
on\python38-32\lib\site-packages …Run Code Online (Sandbox Code Playgroud) 我想安装Twint:
pip install twint
Run Code Online (Sandbox Code Playgroud)
但它失败并生成此错误:
ERROR: Command errored out with exit status 1:
command: 'c:\users\ramda\appdata\local\programs\python\python39\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';
__file__='"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ramda\AppData\Local\Temp\pip-record-itnmxqui\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\ramda\appdata\local\programs\python\python39\Include\pycares'
cwd: C:\Users\ramda\AppData\Local\Temp\pip-install-lbx86gde\pycares\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\pycares
copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
running build_ext
generating …Run Code Online (Sandbox Code Playgroud) 我正在尝试为 ipython 安装线分析器。我正在使用 anaconda 来使用 python。
当前版本的python是:
Python 3.6.2 |Anaconda, Inc.| (default, Sep 19 2017, 08:03:39) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Run Code Online (Sandbox Code Playgroud)
当我尝试使用 pip 安装线路分析器时,这是我得到的错误输出。
注意:我正在用 python 运行 anaconda。
C:\Users\dsandhu>pip install line_profiler
Collecting line_profiler
Using cached https://files.pythonhosted.org/packages/14/fc/ecf4e238bb601ff829068e5a72cd1bd67b0ee0ae379db172eb6a0779c6b6/line_profiler-2.1.2.tar.gz
Requirement already satisfied: IPython>=0.13 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from line_profiler) (6.1.0)
Requirement already satisfied: setuptools>=18.5 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (36.5.0.post20170921)
Requirement already satisfied: jedi>=0.10 in c:\program …Run Code Online (Sandbox Code Playgroud) 我正在尝试statsmodels通过在命令提示符(admin)中运行此命令来下载程序包:
pip3 install statsmodels
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
"错误:需要Microsoft Visual C++ 14.0.使用"Microsoft Visual C++构建工具"获取它:http: //landinghub.visualstudio.com/visual-cpp-build-tools "
请注意,我已经安装了Visual Studio 2015,并且我的计算机上也安装了Visual Studio 2013.
我遇到了这个小项目,用于创建要在 python 中使用的Black-Scholes函数的 C 编译版本。
\n尽管示例代码似乎已于今年 7 月发布,但setup.py构建的使用类型似乎已在旧版构建之外被弃用。任何编译失败,首先抱怨缺少MS C++ 14编译器(这不是真的),然后进一步调查,似乎表明 setup.py 不能再使用。
问:如何将其转换setup.py为有效pyproject.toml文件?
from setuptools import setup, Extension\n\next = Extension(\'bs\', sources=[\'black_scholes/bs.c\'])\n\nsetup(\n name="black_scholes",\n version="0.0.1",\n description="European Options Pricing Library",\n packages=[\'black_scholes\'],\n ext_modules=[ext]\n)\nRun Code Online (Sandbox Code Playgroud)\n从有点模糊的网站(上面),我创建了以下树结构。
\n$ tree -L 3 ./\n./\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 black_scholes\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 black_scholes\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 Makefile\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 bs.c\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 pyproject.toml\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 setup.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 README.md\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 bs_test.py\nRun Code Online (Sandbox Code Playgroud)\n可能相关的问题:
\n我以管理员权限运行命令提示符以在我的计算机上卸载 Ananconda,在此过程之后,我重新打开 cmd 并在我的 cmd 开头找到“系统找不到指定的路径”这一行。
我可以保证我的 cmd 之前没有这条线,我该如何解决?这是我应该注意的严重错误吗?
谢谢你。
python ×8
pip ×3
anaconda ×2
python-3.x ×2
bcrypt ×1
c++14 ×1
cmd ×1
compilation ×1
package ×1
pycharm ×1
pycrypto ×1
python-2.7 ×1
setup.py ×1
statsmodels ×1
visual-c++ ×1
windows ×1