I am new to Python and am trying to install Eve. I have Python 3.6.3 installed and am using pipenv. When I run pipenv install eve it fails with the error (here's an excerpt):
running build_ext
building 'simplejson._speedups' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'
_______________________________________
Error: An error occurred while installing eve!
Failed building wheel for simplejson
From what I can tell, this path is for the Windows 8.1 SDK.
What can I do to fix this? Do I need to install this SDK in order for simplejson to work? I don't really want to install this SDK, so why does simplejson need this?
I suspect that I don't actually need this SDK as I assume all of this can normally be executed in a Linux environment. Why would this dependency exist when executing on a Windows 7 machine as I am trying to do?
I found the answer. Yes, I do need the SDK. Windows compilers are required to "Install a non-pure Python package from sources with Pip" on Windows machines and are included in Microsoft Build Tools. More information can be found here: https://wiki.python.org/moin/WindowsCompilers
Related
I've read all of the other questions on this error and frustratingly enough, none give a solution that works.
If I run pip install sentencepiece in the cmd line, it gives me the following output.
src/sentencepiece/sentencepiece_wrap.cxx(2809): fatal error C1083: Cannot open include file: 'sentencepiece_processor.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
I'm running python 3.10.1 and pip 22.0.3 .
*I have the following Microsoft Visual C++ programs on my windows machine,which I've just done a fresh install of as it was complaining of not having a particular C++ program.
MS VC++
I've even added the .exe file to my PATH variables but still I get the same error.
Am I missing a particular Microsoft program on my pc?
I haven't seen this problem in Windows, but for Linux, I would normally reinstall Python after installing the dependencies (such as the MSVC thing). In that case this is especially helpful because I'm often rebuilding (compiling and other related steps) Python/Pip.
Could also just be an error specific to the module and Python version combo you're trying.
From a discussion in the comments:
I have the pyenv-win version manager, so I was able to create venvs and test this for you. With Python 3.10.2, it fails; with Python 3.8.10, it's successful. So, yes, reinstalling does seem to be worthy of your time.
With python3.10
On Windows: First, install vcpkg and install sentencepiece:x64-windows-static
copy the header and lib files from vcpkg/installed/x64-windows-static/include and lib to
C:/Program Files/python310/build/root/include and lib
This should work as the setup.py install expects the library in a ..\build\root\lib directory.
As the C:\Program Files\python310\lib is in the /LIBPATH, the resulting ..\build\root\lib will point to the sentencepiece.lib
If still encounting errors, then set the INCLUDE and LIB environment variables so that the cl.exe , which is called from pip install sentencetransformers finds them.
People having windows+python 3.10 env, here are exact steps to install it via vcpkg.
Other instructions are covered in zweistein's answer.
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install sentencepiece:x64-windows-static
The python command is pip install mysql-python
The full error is _mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
Can someone please tell me how to fix this error?
What exactly is mysql-python and how is it different from regular mysql?
Another stack overflow post suggested installing it with a setup executable, where can I find this?
I installed something called mysql python connector from here:
https://downloads.mysql.com/archives/c-c/
It installed into C:\Program Files\MySQL\MySQL Connector C 6.1
However, I cannot find mysqld executable anywhere in this folder
Does this install mysql or do I actually need to install it from the Oracle website?
This required the full MySql server installation from Oracle
mysql-python is a module built for python-2 for interfacing with the mysql server so this does not include the mysql server and there is a fork of the same module called mysqlclient for python-3.
The reason for your error is you haven't installed Visual Studio 2019 to compile the c/c++ code in the python package. If you don't want to install Visual Studio 2019 check out these Python Wheel (.whl) files according to your python version
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python (Python 2)
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient (Python 3)
I am trying to install dedupe module and I am getting an error below,
error: command 'cl.exe' failed: No such file or directory
Failed building wheel for dedupe
Failed building wheel for dedupe-hcluster
Failed building wheel for affinegap
Failed building wheel for pylbfgs
Failed building wheel for pyhacrf-datamade
I found this link, that did not help me to resolve.
I am using Windows 10 , 64-bit, Python 3.5.4 :: Anaconda custom (64-bit).
I found the .whl file here, (dedupe-1.9.2-cp35-cp35m-manylinux1_x86_64.whl) downloaded it and tried to use pip install <>.whl and I got an error,
dedupe-1.9.2-cp35-cp35m-manylinux1_x86_64.whl is not a supported wheel
on this platform.
Any ideas on how to resolve this issue?
So, finally, after more research I successfully installed dedupe library. Just thought of posting my own answer if anyone might come across this issue.
In the beginning I only had Visual Studio Build Tools 2017 installed with Visual Studio 2015.
After posting the question I installed Visual Studio Community 2017 (2). And then tried use pip install dedupe still gave me errors like in this post.
Then according to the post, I upgraded the numpy =1.14 and tried pip install dedupe, it worked.
(I am not an expert python setup person, not sure how to explain other than this plain explanation)
I downgraded my python version and it worked first try
I am having severe problems installing pycddlib for Python 3.6 on Windows 10.
The package can be found here. However there is no wheel for Python 3.6 and hence the provided wheels to not support my system.
I followed the instructions on this site to build a wheel. I tried to install Visual C++ Build Tools 2015 however I had no sucess in installing the package as pip install pycddlib throws the error
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
Instead I installed Visual Studio 2017 with Python development workload and the Native development tools option. Trying to install pycddlib now does not throw the same error but simply the following error
Failed building wheel for pycddlib
This thread suggests that one has to install required packages first, but pycddlib does not seem to require anything else
This website suggests building instructions for the package pycddlib. Nonetheless I am lacking knowledge to update theses instructions in order to build the correct thing for my setup.
Thanks for your help!
The developer has added support for python 3.6. Hence there are working wheels for Python 3.6 under this link available now.
I'm trying to install PyCrypto 2.4.1 on my local machine (Windows 7 64bit).
But, I got following messages on 'python setup.py install'.
running install
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Unable to find vcvarsall.bat
What I want to ask is this: can I just copy lib folder which contains Crypto folder in it to where my app is located? I'm developing a Google AppEngine app using Python27 runtime, and, I just need local library for PyCrypto.
Actually, I just needed some compiled version of PyCrypto for Windows 64bit.
PyCrypto version: 2.3.1
Python version: 2.7.1
Target platform: Windows 64bit
And, I could get one from here. And, this is a direct download link.
Thanks, everyone!
Did a bit of research for you, and here's the bug that was filed for the SDK:
http://code.google.com/p/googleappengine/issues/detail?id=2493
Summary of the issue:
GAE has a customized version of PyCrypto 2.0.1 installed. Docs can be found here.
SDK does not include the PyCrypto implementation from GAE, so it needs to be installed locally. However, the default path for installation is blocked by the SDK. Solution recommended in the bug comments is to install PyCrypto in each app's directory. Steps are outlined in the bug comments (not trivial).
Hope this helps!
EDIT: This one could be helpful as well: http://code.google.com/p/googleappengine/issues/detail?id=1627
You don't need to do any of this, just install from the PyCrypto binaries
Alternatively, simply download and install ActivePython-2.7.2.5-win64-x64.msi (or ActivePython-2.7.2.5-win32-x86.msi for Win32) then run pypm install pycrypto