I am trying to install a python package called osmium into a virtual environment that I created with venv. With the virtual environment activated and from the Scripts directory of the virtual environment, calling
pip install osmium
fails (error message below). I am using pycharm as an IDE. Attempting to install osmium via the IDE also fails.
Interestingly, I have a colleague with the identical computer and identical versions of python and pycharm who succeeded in installing osmium. He relied directly on the virtual environment created by pycharm (which, I think, uses virtualenv instead of venv), never using venv and had no problem.
I even went as far as reinstalling both python and pycharm to no avail. I wonder what's going on here. Why is this happening in the first place? And what is causing the failure even after reinstalling (do some traces of python and pycharm remain?)
The error message is:
D:\virtual_envs\test_env\Scripts>activate
(test_env) D:\virtual_envs\test_env\Scripts>pip install osmium
Collecting osmium
Using cached https://files.pythonhosted.org/packages/65/ec/41bc12a33bc9feab921e5e21999fe30882288f2f4f8d8a4536dcd03e2c0b/osmium-2.15.2.tar.gz
Installing collected packages: osmium
Running setup.py install for osmium ... error
Complete output from command d:\virtual_envs\test_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\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\J84120~1\AppData\Local\Temp\pip-record-torhb0ih\install-record.txt --single-version-externally-managed --compile --install-headers d:\virtual_envs\test_env\include\site\python3.7\osmium:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\osmium
copying src\osmium\version.py -> build\lib.win32-3.7\osmium
copying src\osmium\__init__.py -> build\lib.win32-3.7\osmium
creating build\lib.win32-3.7\osmium\osm
copying src\osmium/osm\mutable.py -> build\lib.win32-3.7\osmium/osm
copying src\osmium/osm\__init__.py -> build\lib.win32-3.7\osmium/osm
creating build\lib.win32-3.7\osmium\replication
copying src\osmium/replication\server.py -> build\lib.win32-3.7\osmium/replication
copying src\osmium/replication\utils.py -> build\lib.win32-3.7\osmium/replication
copying src\osmium/replication\__init__.py -> build\lib.win32-3.7\osmium/replication
running build_ext
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found Protozero: C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/contrib/protozero/include (found suitable version "1.6.7", minimum required is "1.5.1")
CMake Warning at cmake/FindOsmium.cmake:127 (message):
Osmium: Can not find some libraries for PBF input/output, please install
them or configure the paths.
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
-- Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
CMake Warning at cmake/FindOsmium.cmake:153 (message):
Osmium: Can not find some libraries for XML input/output, please install
them or configure the paths.
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
CMake Error at D:/virtual_envs/test_env/Lib/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Osmium (missing: ZLIB_FOUND EXPAT_FOUND BZIP2_FOUND) (found
suitable version "2.15.1", minimum required is "2.14")
Call Stack (most recent call first):
D:/virtual_envs/test_env/Lib/site-packages/cmake/data/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOsmium.cmake:278 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/J84120841/AppData/Local/Temp/pip-install-3_44nlf3/osmium/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 150, in <module>
zip_safe=False,
File "d:\virtual_envs\test_env\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "d:\virtual_envs\test_env\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 67, in run
self.build_extension(ext)
File "C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\setup.py", line 110, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "C:\Users\J84120841\AppData\Local\Programs\Python\Python37-32\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\J84120~1
\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=d:\\virtual_envs\\test_env\\scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\build\\lib.win32-3.7', '-DOSMIUM_INCLUDE_DIR=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/libosmium/include', '-DPROTOZERO_INCLUDE_DIR=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/protozero/include', '-DPYBIND11_PREFIX=C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium/contrib/pybind11']' returned non-zero exit status 1.
----------------------------------------
Command "d:\virtual_envs\test_env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\J84120~1\\AppData\\Local\\Temp\\pip-install-3_44nlf3\\osmium\\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\J84120~1\AppData\Local\Temp\pip-record-torhb0ih\install-record.txt --single-version-externally-managed --compile --install-headers d:\virtual_envs\test_env\include\site\python3.7\osmium" failed with error code 1 in C:\Users\J84120~1\AppData\Local\Temp\pip-install-3_44nlf3\osmium\
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(test_env) D:\virtual_envs\test_env\Scripts>
The problem lies in OS dependencies for development packages. From the documentation, you can get library names that you also see in your error message
sudo apt-get install build-essential cmake libboost-dev \
libexpat1-dev zlib1g-dev libbz2-dev
That command is for Debian-based distributions. So you have to find MS Windows versions
Bzip2
http://gnuwin32.sourceforge.net/packages/bzip2.htm
Zlib
http://gnuwin32.sourceforge.net/packages/zlib.htm
expat as NuGet package
https://www.nuget.org/api/v2/package/expat.v141/2.2.6
There is an option from ZeroC Ice for VisualStudio
Related
I'm trying to boot up an ubuntu ec2 instance and I need dlib installed. I am trying to use the command pip install dlib and the installation is breaking.
I'm using a Ubuntu deep learning AMI because it has cv2 and other package I need already installed. I started with a p2.large but moved to a p2.xlarge because this post recommended getting more RAM to install dlib.
How to install pip2 on kali?
However, this did not work.
Any ideas?
Here's the error message:
Collecting dlib
Using cached dlib-19.21.1.tar.gz (3.6 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/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 /tmp/pip-wheel-dj_f226q
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (537 lines):
running bdist_wheel
running build
running build_py
package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
-- Found system copy of libpng: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpng.so;/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libz.so
-- Found system copy of libjpeg: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libjpeg.so
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Checking for module 'lapack'
-- Found lapack, version 3.10.3
-- Looking for cblas_ddot
-- Looking for cblas_ddot - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found Intel MKL BLAS/LAPACK library
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
-- Found CUDA: /usr/local/cuda-10.1 (found suitable version "10.1", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: /usr/local/cuda/lib64/libcudnn.so
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- Building a cuDNN test project to check if you have the right version of cuDNN installed...
-- Enabling CUDA support for dlib. DLIB WILL USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6
Invoking CMake build: 'cmake --build . --config Release -- -j32'
[ 1%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o
[ 2%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cuda_dlib.cu.o
/home/ubuntu/anaconda3/envs/pytorch_p36/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/type_traits(177): error: "conjunction_v" is not a function or static data member
----------------------------------------
ERROR: 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
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (539 lines):
running install
running build
running build_py
package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00017e17_00000000-6_cusolver_dlibapi.cpp1.ii".
Compilation terminated.
CMake Error at dlib_generated_cusolver_dlibapi.cu.o.Release.cmake:280 (message):
Error generating file
/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6/dlib_build/CMakeFiles/dlib.dir/cuda/./dlib_generated_cusolver_dlibapi.cu.o
dlib_build/CMakeFiles/dlib.dir/build.make:89: recipe for target 'dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o' failed
make[2]: *** [dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o] Error 1
CMakeFiles/Makefile2:162: recipe for target 'dlib_build/CMakeFiles/dlib.dir/all' failed
make[1]: *** [dlib_build/CMakeFiles/dlib.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 262, in <module>
'Topic :: Software Development',
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 135, in run
self.build_extension(ext)
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 175, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j32']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -m pip install --upgrade pip' command.
Using following combination is one of the possible option;
Amazon Machine Image (a.k.a. ami) = ami-0949532e81c9eab21 (i.e. Deep Learning AMI (Ubuntu 16.04) Version 38.0)
AWS EC2 Instance Type = p2.xlarge
I've been trying to work on a face recognition project, but when I try to install dlib in pycharm I get this error.
Collecting dlib
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\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\Alexis\AppData\Local\Temp\pip-record-kq4elzu2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Alexis\.virtualenvs\pythonProject\include\site\python3.9\dlib'
cwd: C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\
Complete output (77 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Building extension for Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\lib.win-amd64-3.9 -A x64'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version to target Windows 10.0.19041.
CMake Error at CMakeLists.txt:14 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.4084.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/1/2020 2:39:22 PM.
Project "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.14
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Alexis/AppData/Local/Temp/pycharm-packaging/dlib/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 223, in <module>
setup(
File "C:\Users\Alexis\.virtualenvs\pythonProject\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\.virtualenvs\pythonProject\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=C:\\Users\\Alexis\\.virtualenvs\\pythonProject\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1:
'C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\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\Alexis\AppData\Local\Temp\pip-record-kq4elzu2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Alexis\.virtualenvs\pythonProject\include\site\python3.9\dlib' Check the logs for full command output.
----------------------------------------------------------------------------
try pip install dlib --no-cache-dir if that doesn't work downgrade to python version 3.8.
I tried installing it on version 3.8 and it work fine.
Installed Pycharm
Windows 10
Python 3.8.3 (with pipenv, but should work with pip also)
ex: pipenv install (as virtual env)
since "pipenv install dlib" was giving installation errors after struggling for sometime, able to install the latest dlib library (dlib==19.20.0)
Below is the procedure which helped me to succeed in installing the latest dlib - we have to Manually compile the dlib for Python
Install visual studio (I installed Microsoft Visual Studio Community 2019 Version 16.6.3)
Make Sure to select Visual C++ Or C++ environment - complete the installation - Nothing else is needed (In Visual Studio 2019 go to the Individual Components tab, Visual C++ Tools for Cmake, and check the checkbox under the "Compilers, build tools and runtimes" section.)
Goto - https://cmake.org/download/ and download the cmake for 64bit (cmake-3.18.0-rc4-win64-x64.msi is what i installed)
When installing, make sure to add CMake to the system path (once installation is complete -> check that Environment variable to see this is present)
Goto https://pypi.org/project/dlib/ -> Click on "Download Files"
dlib-19.20.0.tar.gz (is what i had as latest) -> Download the same
extract the file "dlib-19.20.0.tar.gz" till you see the files (dlib, dlib.egg-info, python_examples, tools, MANIFEST.in, PKG-INFO, README.md setup.cfg, setup.py)
Copy all these files (select all (ctrl+a)and copy(ctrl+c)) -> Make sure to copy only these files and not its parent directory along
Goto site-packages in python installation (C:\Users\AppData\Local\Programs\Python\Python38\Lib\site-packages)
Paste all the files copied in step 7,8
open command prompt and goto -> C:\Users\AppData\Local\Programs\Python\Python38\Lib\site-packages
execute command -> python setup.py install
Thats all you should be done - it might take 5 - 10 mins to complete the process, you should see something like below in the end Installed c:\users\appdata\local\programs\python\python38\lib\site-packages\dlib-19.20.0-py3.8-win-amd64.egg Processing dependencies for dlib==19.20.0 Finished processing dependencies for dlib==19.20.0
Installing numba and llvmlite Python on Windows 10 failure
I have tried to install Python numba on Windows 10 using
pip install numba
with partial success, but a failure installing llvmlite
Requirement already satisfied: numpy>=1.15 in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (1.19.2+mkl)
Requirement already satisfied: setuptools in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (49.2.1)
Building wheels for collected packages: numba, llvmlite
Building wheel for numba (setup.py) ... done
Created wheel for numba: filename=numba-0.51.2-cp39-cp39-win_amd64.whl size=2173229 sha256=249a12f2e1436ac244e2730f6e7ddb5bd53413460dcbdc4ed4e6aeebbf16d6ce
Stored in directory: c:\users\paul\appdata\local\pip\cache\wheels\0a\51\41\9f5a61bcd9d25271d7021e05cbabcd574fb3d534d07654b780
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
CMake Error at CMakeLists.txt:9 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
Doesn't know where LLVM is installed?
So I used Windows Environment editor to add LLVM_DIR with value C:\Program Files\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm
in the hope that it will use one of the four Clang versions that I have installed at C:\LLVM\clang-1100, C:\LLVM\clang-1000 ...
latest binary is C:\LLVM\clang-1100\LLVM\bin
I also have VS 1017 and 1019 installed, and all compilers are working OK from other IDEs and builds.
and downloaded the most recent wheel
llvmlite-0.34.0-cp39-cp39-win_amd64.whl
and added LLVM_DIR to system PATH
C:\Program Files\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm
This allows it to more nearly work, but fails using MSVC
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\ZERO_CHECK.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'D:\winlibs64_stage\custombuilt\lib\libffi.dll.a' [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
Trying generator 'Visual Studio 15 2017 Win64'
Traceback (most recent call last):
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 191, in <module>
main()
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 179, in main
main_win32()
File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 94, in main_win32
subprocess.check_call(['cmake', '--build', build_dir, '--config', config])
File "c:\users\paul\appdata\local\programs\python\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', 'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\ffi\\build', '--config', 'Release']' returned non-zero exit status 1.
error: command 'c:\\users\\paul\\appdata\\local\\programs\\python\\python39\\python.exe' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paul\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\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\Paul\AppData\Local\Temp\pip-record-l4absc_g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paul\appdata\local\programs\python\python39\Include\llvmlite' Check the logs for full command output.
This suggests that the output folder location is not specified, or that VS incremental build option is not set to 'not used'.
Or that I should use an LLVM version, but I don't know how to specify which one, and not use VS2017.
Suggestions how to get out of this rabbit hole most welcome ;-)
Thanks
Paul
I wanted to install librosa but I get stack with this error, but I managed to solve it with this:
first I download the last version of llvmlite Here
than I run the following command:
pip install llvmlite-0.35.0-cp39-cp39-win_amd64.whl
next for all packages need by librosa I install them as follow:
pip install --no-deps packageName
or just for more sample do as follow :
pip install librosa --ignore-installed llvmlite
Vpython versions are not available from their website, but according to https://groups.google.com/forum/#!topic/vpython-users/AmIZF2v4Wkc, "pip install vpython" should work for any version of Python.
I entered "pip install vpython" into the windows command prompt. After several minutes of downloading, pip gave me the following error:
Running setup.py install for vpnotebook ... error
Complete output from command c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\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\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile:
ImportError install_kernel_spec
c:\users\zachary\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py:331: UserWarning: Normalizing '0.1.03' to '0.1.3'
normalized_version,
running install
Installing Python module...
running build
running build_py
creating build
creating build\lib
creating build\lib\vpnotebook
copying vpnotebook\__init__.py -> build\lib\vpnotebook
creating build\lib\vpnotebook\data
copying vpnotebook\data\kernel.json -> build\lib\vpnotebook\data
running install_lib
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\data\kernel.json -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\__init__.py -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
byte-compiling c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\__init__.py to __init__.cpython-36.pyc
running install_egg_info
running egg_info
writing vpnotebook.egg-info\PKG-INFO
writing dependency_links to vpnotebook.egg-info\dependency_links.txt
writing top-level names to vpnotebook.egg-info\top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'vpnotebook.egg-info\SOURCES.txt'
writing manifest file 'vpnotebook.egg-info\SOURCES.txt'
Copying vpnotebook.egg-info to c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook-0.1.3-py3.6.egg-info
running install_scripts
writing list of installed files to 'C:\Users\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt'
Installing custom kernel ...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\setup.py", line 30, in <module>
package_data={'vpnotebook': ['data/kernel.json']},
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 72, in run
run_kernel_install(False)
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 63, in run_kernel_install
install_kernel_spec(source_dir, kernel_name='vpython', user=user)
NameError: free variable 'install_kernel_spec' referenced before assignment in enclosing scope
----------------------------------------
Command "c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\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\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\
The immediate fix is to install jupyter before you install vpnotebook:
pip install jupyter
Thanks for reporting this; in the future issues posted at either the location #user1114907 indicated or at the main github repo: https://github.com/BruceSherwood/vpython-jupyter/issues
This appears to be a bug in vpnotebook, upon which vpython depends. Trying to install vpnotebook in both Python 2.7 and 3.5 fails with the same error, which appears to have been caused by the package's authors not even using a basic linter. I would suggest reporting this to said authors, but there are no contact details, repositories, or project websites listed on the package's PyPI page.
If your python version is greater than 2.7.9, skip to step 3
Install python version > 2.7.9 [2.7.14 is the latest]
Download latest version of python
extract the archive
./configure
make
make install
Download and re-install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
Install jupyter First
sudo pip install jupyter
Then, install vpython
sudo pip install vpython
Post-installation Screenshot
i am trying to install gmpy via pip install gmpy in a test environment that was created using virtualenv but it is kicking back an error
my laptop is a windows 8.1 x64 using Python 27 x32
i installed the Microsoft Visual C++ Compiler Package for Python 2.7 because i was getting the unable to find vcvarsall.bat error message. once i installed the C++ Compiler Package for Python 2.7 and upgraded setuptools to 7.0 that message went away but i get the following:
c:\envs\testenv1\build\gmpy\src\gmpy.h(30) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Cleaning up...
Removing temporary dir C:\envs\testenv1\build...
Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
Exception information:
Traceback (most recent call last):
File "C:\envs\testenv1\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\envs\testenv1\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\envs\testenv1\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
can someone point me in the right direction?
i have the following installed:
Microsoft Visual 2008 Redistributable - x64 9.0.30729.6161
Microsoft Visual 2008 Redistributable - x86 9.0.30729.6161
Microsoft Visual 2010 x64 Redistributable - 10.0.40219
Microsoft Visual 2010 x86 Redistributable - 10.0.40219
Microsoft Visual 2012 Redistributable (x64) - 11.0.61030
Microsoft Visual 2012 Redistributable (x86) - 11.0.61030
Microsoft Visual C++ Compiler Package for Python 2.7
i do not want to install VS2008 or MINGW. i was hoping the "Microsoft Visual C++ Compiler Package for Python 2.7" would rectify the problem but it didnt.
I maintain gmpy and l'll just say it is very challenging to build gmpy and gmpy2 on Windows. Is there a reason you can't use the pre-built binaries? gmpy / gmpy2 rely on a single DLL so it fairly easy to copy to a different location if needed.
I would suggest you to install the anaconda distribution on your system. Installing gmpy2 using conda is really simple. It takes care of all the dependencies for you. All you need to do is type the command : conda install gmpy2 inside your environment and you'll have it installed in a few seconds.