Python 3.5.2 failed with error code 1 OS:Win10 - python

I'm rookie in python, try to install scrapy but here's what python return
Failed building wheel for lxml
here's the full msg.
Command
"C:\Users\sande\AppData\Local\Programs\Python\Python35-32\python.exe
-u -c "import setuptools, tokenize;file='C:\Users\sande\AppData\Local\Temp\pip-build-fisxcup_\lxml\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\sande\AppData\Local\Temp\pip-qzhtmsde-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users\sande\AppData\Local\Temp\pip-build-fisxcup_\lxml\
There's few solution on StackOverflow, tried but still not work.
Here's what I tried
-m pip install wheel
success, but doesn't make any difference.
-m pip install twisted
Fail, here's what python return
error: Unable to find vcvarsall.bat
Failed building wheel for twisted
-m pip install python3-dev
Failed, here's the return
Could not find a version that satisfies the requirement python3-dev (from versions: )
No matching distribution found for python3-dev
I'm running out of idea, please kindly assist, thanks in advance.

From the scrapy website
I dont think your going to have success with python 3 and scrapy.
Python 3 is not supported on Windows. This is because Scrapy core requirement Twisted does not support Python 3 on Windows.

also from the scrapy website you could try installing it using anaconda (there's a py35 install), check this related answer

Related

Problem while installing OwlReady2 (Python lib) in Ubuntu

I am trying to install the owlready2 lib in Ubuntu by following the method below but I face a problem.
I updated the system and applications
Installed Python 3 and made it the working version (default)
Installed pip3
Used pip and pip3 to install the owlready2 lib
But I faced the below problem which seems to be a problem with the library package:
error: can't copy './hermit/org/semanticweb/hermiT/hierarchy':
doesn't exist or not a regular file"
Command /usr/bin/python3 -c "import setuptools,
tokenize;file='/tmp/pip_buil
d_root/owlready2/setup.py';exec(compile(getattr(tokenize, 'open',
open)(file ).read().replace('\r\n', '\n'), file, 'exec'))"
install --record /tmp/pip-lq v533ik-record/install-record.txt
--single-version-externally-managed --compile f ailed with error code 1 in /tmp/pip_build_root/owlready2 Storing debug log for failure in
/home/ubuntu/.pip/pip.log
Does anyone have any ideas how to resolve this?
Try to install your package with the following command:
python3 -m pip install -I owlready2
If pip3 does not work, you also install Owlready2 manually : download the sources, then run in a terminal:
cd /path/to/Owlready2
python setup.py build
python setup.py install # as root
Also, that would be a good ide to install pip3 and try to install your package with pip3, commands below:
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user
I encountered the same problem.
It seems that the issue might lie in something that was added in version 0.14 (at the time of writing the newest version is 0.19). If the owlready2 version is newer than 0.13 then you will encounter the problem.
I have tested these Python versions - 3.7.3 (works), 3.6.8(works), 3.5.2(works until v0.13), 3.4.3(works until v0.13)
To install version v0.13 of owlready2:
pip install owlready2==0.13

Installing psycopg2 fails completely. Huge error message (such as error: command 'gcc' failed with exit status 1)

I have a problem with installing psycopg2 on my mac. I tried several things such as installing it with pip and also homebrew. I also downloaded all dependencies but it still fails to install it.
I get the following error message, which looks horrifying:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1c/nhs40gy513143dfqyblmt3r80000gn/T/pip-install-rxlPem/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/1c/nhs40gy513143dfqyblmt3r80000gn/T/pip-record-93LksX/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/1c/nhs40gy513143dfqyblmt3r80000gn/T/pip-install-rxlPem/psycopg2/
What could be the issue?
EDIT: Full error can be found here, and this appears to be the most relevant part:
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.sdk' [-Wmissing-sysroot]
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
psycopg2 has some install dependencies that might be giving you trouble. In this case it looks like the install process can't find stdio.h, part of the C standard library. Installing the Xcode Command Line Tools might help.
But if you don't want to bother with this, try installing psycopg2-binary instead:
You can also obtain a stand-alone package, not requiring a compiler or external libraries, by installing the psycopg2-binary package from PyPI:
$ pip install psycopg2-binary
The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.
for anybody looking for solution or future reference to this,
I faced this issue while installing psycopg2 on Mojave, following on, i could find link to psycopg2 github issue. which has the solution as installing missing library header, using
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
This is probably an issue with Mojave, enter link description here
Anyone having this issue with a Debian distribution can use this solution
Install the development headers for postgresql:
sudo apt install python3-dev libpq-dev
then try:
pip3 install psycopg2
hope this solves your issues

Scipy installation failed with error code 1

I'm trying to install Scipy through pip.
when doing
pip install scipy
I get the error
failed with error code 1 in C:\Users\MYNAME\AppData\Local\Temp\pip-build-c3n82mii\Scipy\
I got pip updated to newest version (8.1.2) and python 3.5.2. any help?
FULL ERROR:
Command
"c:\users\MYNAME\appdata\local\programs\python\python35-32\python.exe
-u -c "import setuptools, tokenize;__file__='C:\\Users\\MAYNA~1\\AppData\\Local\\Temp\\pip-build-c3n82mii\\Scipy\\se‌​tup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))"
install --record
C:\Users\IDANRA~1\AppData\Local\Temp\pip-76_6hqtw-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
C:\Users\MYNA~1\AppData\Local\Temp\pip-build-c3n82mii\Scipy\
The most likely problem is the lack of the appropriate compiler(s) on your machine and its paths - scipy uses a lot of C code for speed and pip will by default, if there isn't a wheel available for SciPy that matches your combination of python and OS, download the source and try to build it.
I have had a look at the latest release of SciPy on pipy and it is 0.18.0rc2 which doesn't have a Windows build as a wheel.
You have 2 choices:
Install the appropriate compilers for your version of python and OS
Go to Chris Gohlke's excellent unofficial windows binaries page here and download the installer for your version of python.

Python: Error code 1 when installing Numpy from Pip

I appreciate that there are several topics on the pip error code 1 but the solutions haven't worked and the question has ended.
I installed the full Python 3.4 package at work. I tried to use Pip to install the Numpy package but couldn't get past my works proxy. I downloaded Numpy and added the install file path to %PATH% and again tried to install using Pip but now I am getting 'Error Code 1'. I then tried to install the wheel as one Stack Overflow answer had suggested but still get 'Error Code 1'. I have also tried installing various versions of Numpy and successfully installed the latest version of Pip via Pip installer so I know the %PATH% and Pip install is good.
Python Version: 3.4
Pip Version: 7.1.2
Windows 7 64bit
Numpy Version: 1.10.1
Error:
Command "C:\Python34\python.exe - c "import setuptools, tokenize;__file__='C:\\Users\\MC364~1.BRA\\AppData\\Local\\Temp\\pip-2kvveqqk-build\\setup.py';exec(cinouke(getattr(tokenize, 'open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\MC364~1.BRA\AppData\Local\Temp\pip-q_5tj3ef-record\install-record.txt --single-version-externally-managed --compile" failed with error coode 1 in C:\Users\MC364~1.BRA\AppData\Local\Temp\pip-2kvveqqk-build

pip install -U PySide error

Does anyone know how to avoid the following error when running pip install -U PySide as per the official website instructions here: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system
Note that I have already done brew install qt successfully.
You are using pip version 7.0.3, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting PySide
Using cached PySide-1.2.4.tar.gz
Installing collected packages: PySide
Running setup.py install for PySide
Complete output from command /Applications/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-0r7hrI-record/install-record.txt --single-version-externally-managed --compile:
Removing /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_package
running install
running build
Python architecture is 64bit
Inserting path "/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release/bin" to environment
==============================
Package version: 1.2.4
Build type: Release
Build tests: False
---
Make path: /usr/bin/make
Make generator: Unix Makefiles
Make jobs:
---
Script directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide
Sources directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources
Build directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release
Install directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release
Python site-packages install directory: /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release/lib/python2.7/site-packages
---
Python executable: /Applications/anaconda/bin/python
Python includes: /Applications/anaconda/include/python2.7
Python library: /Applications/anaconda/lib/libpython2.7.dylib
Python prefix: /Applications/anaconda
Python scripts: /Applications/anaconda/bin
---
Qt qmake: /Applications/anaconda/bin/qmake
Qt version: 4.8.6
Qt bins: /Applications/anaconda/bin
Qt plugins: /Applications/anaconda/plugins
---
OpenSSL libs: None
==============================
Creating build folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release...
Creating install folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release...
Building module shiboken...
Creating module build folder /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release/shiboken...
Configuring module shiboken (/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken)...
Running process: /usr/local/bin/cmake -G "Unix Makefiles" -DQT_QMAKE_EXECUTABLE=/Applications/anaconda/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken -DPYTHON_EXECUTABLE=/Applications/anaconda/bin/python -DPYTHON_INCLUDE_DIR=/Applications/anaconda/include/python2.7 -DPYTHON_LIBRARY=/Applications/anaconda/lib/libpython2.7.dylib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DALTERNATIVE_QT_INCLUDE_DIR=/Applications/anaconda/include
/usr/local/bin/cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/Applications/anaconda/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_install/py2.7-qt4.8.6-64bit-release /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/sources/shiboken -DPYTHON_EXECUTABLE=/Applications/anaconda/bin/python -DPYTHON_INCLUDE_DIR=/Applications/anaconda/include/python2.7 -DPYTHON_LIBRARY=/Applications/anaconda/lib/libpython2.7.dylib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DALTERNATIVE_QT_INCLUDE_DIR=/Applications/anaconda/include
-- The C compiler identification is AppleClang 7.0.0.7000072
-- The CXX compiler identification is AppleClang 7.0.0.7000072
CMake Error at /usr/local/Cellar/cmake/3.3.0/share/cmake/Modules/Platform/Darwin.cmake:76 (message):
CMAKE_OSX_DEPLOYMENT_TARGET is '10.5' but CMAKE_OSX_SYSROOT:
""
is not set to a MacOSX SDK with a recognized version. Either set
CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
empty.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.3.0/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/pyside_build/py2.7-qt4.8.6-64bit-release/shiboken/CMakeFiles/CMakeOutput.log".
error: Error configuring shiboken
----------------------------------------
Command "/Applications/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-0r7hrI-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dy/ttgqhqqx3g9bsbsnqnxsk2z80000gq/T/pip-build-CPxEmt/PySide
UPDATE (3-16-2016):
I recently got my hands on a fully updated Mac OS X 10.11 (El Capitan). I proceeded to successfully brew install qt and then tried pip install -U PySide once again (as per these instructions: https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system). Unfortunately, I once again received an error:
Collecting PySide
Downloading PySide-1.2.4.tar.gz (9.3MB)
100% |████████████████████████████████| 9.3MB 162kB/s
Installing collected packages: PySide
Running setup.py install for PySide ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-YVPqB6-record/install-record.txt --single-version-externally-managed --compile:
Removing /private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/pyside_package
running install
running build
Python architecture is 64bit
error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-YVPqB6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/km/x8ww58k15h74q73fvrbqxym40000gp/T/pip-build-ozZWDt/PySide/
It's been many months since my original post and judging by the upvotes, I'm not the only one with this problem. As such, I'm starting to suspect that perhaps the instructions to https://pypi.python.org/pypi/PySide/#installing-pyside-on-a-mac-os-x-system are simply outdated. If anyone actually gets this to work, please upload the recipe. Thank you.
First of all, this is the first time I am answering something in stackoverflow, so please have some patience with me..
I had installed cmake in order to install pyside, and I had the same problem as you. So then, I tried with homebrew:
$ brew doctor
It said that cmake was installed but not linked. In order to link it, I had to run with homebrew:
$ brew link cmake
After that, I tried again:
$ pip3.4 install -U PySide
And it worked, it is now installed and it works.. Hope this helps.
I tried everything but couldn't make it with pip. Finally I tried with homebrew:
$ brew install pyside
and it works fine!
I'm on Mac OS X 10.11 (El Capitan).
As of June 2018 on MacOS High Sierra, you'd still encounter this issue.
Make sure to install qt 4.8.7, brew install qt would install qt5 by default which is not compatible with PySide, if you did install qt5, uninstall it and then install qt4.
brew tap cartr/qt4
brew install qt#4
Create an alias for qmake in your bashrc, if qmake is not detected
alias qmake="/usr/local/Cellar/qt#4/4.8.7_5/bin/qmake"
pip install pyside should work now, it took around 30 minutes for it to complete. So, be patient.
To install binary Python modules on your system you need to properly configure your OS X machine with the build tools. This means that use a recent OS X version AND a recent XCode with command line tools installed.
The fact that I see a deployment target 10.5 seems scare to me as the current version of OS X is 10.11 ... sounds as a far too old SDK.
I solved the second issue by adding CMake to my path:
$> PATH="/Applications/CMake.app/Contents/bin":"$PATH"
That way CMake can actually be found. I am still stumped by the first issue. In fact, I get the first issue after dealing with CMake.
Here is my setup:
Mac OS X (10.10.5)
Python 2.7.10
pip 8.0.2
Qt 4.8.6
CMake 3.6.0-rc02
Xcode Commad Lines tools have been installed.

Categories