I am a windows7 64-bit user working with Python 3.4.
I installed M2Crypto library. I followed the steps mentioned in this link for installing M2Crypto on Windows: https://github.com/martinpaljak/M2Crypto/blob/master/INSTALL
I have Microsot Visual Studeio 2013 community edition installed. I also have Visual c++ 2008, 2010, 2012 redistributable for bith x86 and x64.
I have the MinGW and Swigwin installed in the C: directory.
when I try to install M2Crypto using this command from the Python34/Scripts:
pip install m2crypto
I get errors as the following:
> C:\Python34\Scripts>pip install m2crypto Collecting m2crypto Using
> cached M2Crypto-0.22.3.tar.gz Installing collected packages: m2crypto
> Running setup.py install for m2crypto
> Complete output from command C:\Python34\python.exe -c "import setuptools, t
> okenize;__file__='C:\\Users\\e\\AppData\\Local\\Temp\\pip-build-sxa0uziu\\m2cryp
> to\\setup.py';exec(compile(getattr(tokenize, 'open',
> open)(__file__).read().repl ace('\r\n', '\n'), __file__, 'exec'))"
> install --record C:\Users\e\AppData\Local
> \Temp\pip-ad2ukv1d-record\install-record.txt
> --single-version-externally-managed --compile:
then it copies a list of files. At thie end I get this:
> error: Microsoft Visual C++ 10.0 is required (Unable to find
> vcvarsall.bat).
followed by this:
> Command "C:\Python34\python.exe -c "import setuptools,
> tokenize;__file__='C:\\Us
> ers\\e\\AppData\\Local\\Temp\\pip-build-sxa0uziu\\m2crypto\\setup.py';exec(compi
> le(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n',
> '\n'), __fil e__, 'exec'))" install --record
> C:\Users\e\AppData\Local\Temp\pip-ad2ukv1d-recor d\install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in C:\Users\e\AppData\Local\Temp\pip-build-sxa0uziu\m2crypto
Please, help me fix the issue. I could not find a resource that describe the steps properly.
You need to run pip install from a command prompt with both the needed python programms and visual studio in the search path. (PATH)
Open a Visual C++ command prompt and note the result of
echo %PATH%
and add the relevant visual c++ / visual studio directories to your python command prompt similar to this
set PATH=C:\path\to\VS;%PATH%
Related
I am trying to install the Python module simplecrypto on a Windows machine. To do this I run the following:
C:\Python36\Scripts>pip install simplecrypto
However, upon running this partway through the installation process I receive the following error:
...
Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\EDM-P\\AppData\\Local\\Temp\\pip-build-teqxfnwt\\PyCrypto\\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\EDM-P\AppData\Local\Temp\pip-nrmsip8r-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\EDM-P\AppData\Local\Temp\pip-build-teqxfnwt\PyCrypto\
Why is this the case?
An error occurs when it attempts to install PyCrypto, which is a requirement of the package. The GitHub README mentions:
If the dependency installation fail on Windows, you may want to use a
prebuilt installer. If you wish to compile it I suggest using the
Mingw tools as indicated here.
Install it from here and then compile by
install MinGW with C++ Compiler option checked add C:\MinGW\bin to
your PATH in PYTHONPATH\Lib\distutils, create a file distutils.cfg and
add these lines:
[build] compiler=mingw32
I used the following code to install scikit-bio from Spyder 3, but it showed error. Therefore, could anyone please help? many thanks
Code:
import pip
pip.main (['install', 'scikit-bio'])
Error:
Command "C:\Users\vanna\AppData\Local\Continuum\anaconda3\pythonw.exe -u -c "import setuptools, tokenize;file='C:\Users\vanna\AppData\Local\Temp\pip-build-_nvm7kff\scikit-bio\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\vanna\AppData\Local\Temp\pip-cpfgc63d-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\vanna\AppData\Local\Temp\pip-build-_nvm7kff\scikit-bio\
I had a similar error message during pip installation on CPython (Win 10 x64).
Upgrading setuptools
pip install setuptools --upgrade
and installing build tools for most recent Visual Studio resolved the issue.
Just like here.
Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
EDIT: Looks like I have to install Visual Studio 2015...Can I install dlib without VS 2015? I already have older versions pre-installed with Windows.
I am using Python 3.5, trying to install dlib on PyCharm in the terminal and this is what I am getting, and every search on these errors I do... I find stuff on Visual Studio which I don't have the GUI + I don't have vcvarsall.bat in the VC folder of any of the Visual Studio versions (8, 11, 12, 14). I have searched a good amount before posting this question on the Web.
Do I need to download Visual Studio latest version to get vcvarsall.bat ?
This is CMakeLists.txt:
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(IntelFortranImplicit Fortran)
add_custom_command(
OUTPUT output.cmake
COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake
)
add_library(FortranLib hello.f output.cmake)
This is the error when I do: pip install dlib
Collecting dlib
Using cached dlib-19.6.1.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppDat
a\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code
, __file__, 'exec'))" bdist_wheel -d C:\Users\tiger\AppData\Local\Temp\tmprc21rnv_pip-wheel- --python-tag cp35:
running bdist_wheel
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppD
ata\\Local\\Temp\\pip-build-gjtgkl6a\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
de, __file__, 'exec'))" install --record C:\Users\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile
:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
----------------------------------------
Command "C:\Users\tiger\Anaconda3\envs\TensorFlowExample\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tiger\\AppData\\Local\\Temp\\pip-bu
ild-gjtgkl6a\\dlib\\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\tiger\AppData\Local\Temp\pip-dk1naa28-record\install-record.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\tiger\AppData\Local\Temp\pip-build-gjtgkl6a\dlib\
Solution found here: Using Anaconda installing manager..!
Running the following in PyCharm Terminal: conda install -c conda-forge dlib=19.4
I was able to use dlib! :)
Huge thanks to birryree in the comments for letting me know!
Open Anaconda Prompt in Administrative mode.
conda update conda 3. conda update anaconda
conda create -n dlib_env python=3.7
conda activate dlib_env
conda install -c conda-forge dlib
python
7.1 >>> import dlib 7.2 >>> dlib.version
Source
I was trying to install 'ffnet' module in Python but even after installing Microsoft Visual Studio C++ and mingw32.
But these are the errors which are showing up:
1.' Failed building wheel for ffnet'
2.#Command "c:\anaconda3\python.exe -u -c "import setuptools, #tokenize;__file__='C:\\Users\\AKSHAY~1.BAB\\AppData\\Local\\Temp\\pip-build-#930xyr3q\\ffnet\\setup.py';exec(compile(getattr(tokenize, 'open', open)####(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record #C:\Users\AKSHAY~1.BAB\AppData\Local\Temp\pip-_pl92yit-record\install-record.txt #--single-version-externally-managed --compile" failed with error code 255 in C:\Users\AKSHAY~1.BAB\AppData\Local\Temp\pip-build-930xyr3q\ffnet\
Please anyone Help me with this.
On Windows + Python-3.5 fortran extensions cannot be built
anymore with f2py and mingw32 compilers, because of new MSVC used for python build. See: Build fortran extension on Windows with gfortran and MSVC
Maybe you could try python 3.4 instead?
I am getting following error in installing Cassandra driver for python.
Command "c:\python33\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\vmasama\\appdata\\local\\temp\\pip-build-we10p7\\cassandra-driver\\setup
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n
', '\n'), __file__, 'exec'))" install --record c:\users\vmasama\appdata\local\te
mp\pip-olh8j5-record\install-record.txt --single-version-externally-managed --co
mpile" failed with error code 1 in c:\users\vmasama\appdata\local\temp\pip-build
-we10p7\cassandra-driver\
Any one have any idea about this ? What am i missing ?
Following errors were also there when i run pip install cassandra-driver
Failed building wheel for cassandra-driver
Failed cleaning build dir
for cassandra-driver
python version : 3.3
I tried it in an environment missing compiler paths and observed something similar. I think it's a problem in setuptools error handling when it doesn't find what it's expecting. The easiest way I've found is to use the VS Command Prompt shortcut installed with Visual Studio:
Perhaps the easiest way to do this is to run the build/install from a Visual Studio Command Prompt (a shortcut installed with Visual Studio that sources the appropriate environment and presents a shell).
http://datastax.github.io/python-driver/installation.html#windows-installation-notes