Error with pip install biom-format 'numpy/arrayobject.h' file not found - numpy

I can't manage to install biom format using pip install biom-format.
This is the error I get.
N85566:~ smitra$ pip install biom-format
Collecting biom-format
Using cached biom-format-2.1.5.tar.gz
Requirement already satisfied (use --upgrade to upgrade): click in /usr/local/lib/python2.7/site-packages (from biom-format)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.3.0 in /Library/Python/2.7/site-packages (from biom-format)
Requirement already satisfied (use --upgrade to upgrade): future>=0.14.3 in /usr/local/lib/python2.7/site-packages (from biom-format)
Collecting scipy>=0.13.0 (from biom-format)
Using cached scipy-0.17.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting pyqi (from biom-format)
Building wheels for collected packages: biom-format
Running setup.py bdist_wheel for biom-format ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/w0/sg297rxj3738tghvhq3fhr5c0000gp/T/pip-build-TljllL/biom-format/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/w0/sg297rxj3738tghvhq3fhr5c0000gp/T/tmpmTturCpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.10-x86_64-2.7
creating build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/err.py -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/exception.py -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/parse.py -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/table.py -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/util.py -> build/lib.macosx-10.10-x86_64-2.7/biom
creating build/lib.macosx-10.10-x86_64-2.7/tests
copying tests/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/tests
copying tests/test_err.py -> build/lib.macosx-10.10-x86_64-2.7/tests
copying tests/test_parse.py -> build/lib.macosx-10.10-x86_64-2.7/tests
copying tests/test_table.py -> build/lib.macosx-10.10-x86_64-2.7/tests
copying tests/test_util.py -> build/lib.macosx-10.10-x86_64-2.7/tests
creating build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/installation_informer.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/metadata_adder.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_converter.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_head.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_normalizer.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_subsetter.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_summarizer.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/table_validator.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/uc_processor.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
copying biom/cli/util.py -> build/lib.macosx-10.10-x86_64-2.7/biom/cli
creating build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_add_metadata.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_show_install_info.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_subset_table.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_summarize_table.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_table_converter.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_table_normalizer.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_uc_processor.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
copying tests/test_cli/test_validate_table.py -> build/lib.macosx-10.10-x86_64-2.7/tests/test_cli
running egg_info
writing requirements to biom_format.egg-info/requires.txt
writing biom_format.egg-info/PKG-INFO
writing top-level names to biom_format.egg-info/top_level.txt
writing dependency_links to biom_format.egg-info/dependency_links.txt
writing entry points to biom_format.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'biom_format.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '.git' found anywhere in distribution
writing manifest file 'biom_format.egg-info/SOURCES.txt'
copying biom/_filter.c -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/_filter.pyx -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/_subsample.c -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/_subsample.pyx -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/_transform.c -> build/lib.macosx-10.10-x86_64-2.7/biom
copying biom/_transform.pyx -> build/lib.macosx-10.10-x86_64-2.7/biom
running build_ext
building 'biom._filter' extension
creating build/temp.macosx-10.10-x86_64-2.7
creating build/temp.macosx-10.10-x86_64-2.7/biom
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c biom/_filter.c -o build/temp.macosx-10.10-x86_64-2.7/biom/_filter.o
biom/_filter.c:258:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
^
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for biom-format
Running setup.py clean for biom-format
Failed to build biom-format
Installing collected packages: scipy, pyqi, biom-format
Found existing installation: scipy 0.12.0
Uninstalling scipy-0.12.0:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 746, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/scipy-0.12.0-py2.7.egg-info/dependency_links.txt'
N85566:~ smitra$
============
Another matter,
I tried to update numpy, which seems worked..but still shows me the earlier version. This is what I did.
=========
N85566:~ smitra$ pip install numpy --upgrade
Collecting numpy
Downloading numpy-1.11.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.9MB)
100% |████████████████████████████████| 3.9MB 347kB/s
Installing collected packages: numpy
Found existing installation: numpy 1.7.1
Uninstalling numpy-1.7.1:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 746, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/numpy-1.7.1-py2.7.egg-info/dependency_links.txt'
N85566:~ smitra$
N85566:~ smitra$ python -c "import numpy; print numpy.version.version"
1.7.1
N85566:~ smitra$
==========
Any problem with PATH might be??
Please help me to fix this issue. Thanks, Mitra

I also had the same problem.
try this command:
sudo pip install -Iv https://pypi.python.org/packages/source/b/biom-format/biom-format-1.3.0.tar.gz#md5=bd35f9b7e1c7daf244fe2dffb2777606
hope to be helpful.
Adrian

Related

Can't build wheel and single-version-externally-managed not recognized error on pip install pythonnet WSL 2 VS Code

I am on WSL2 in VS Code. Using Zsh on VS Code.
I am trying to install pythonnet though am getting two errors:
ERROR: Failed building wheel for pythonnet
error: option --single-version-externally-managed not recognized
This is from using pip install pythonnet==2.5.2
My versions are:
Python 3.8.10
Wheel 0.37.0
Mono: 6.8.0.105
pycparser 2.20
I have searched high and low online though I can't find a solution - everything seems to point to updating wheel and installing mono - as you can see from the above version numbers, I have them installed.
I am doing everything from within a virtual env.
Does anyone have any experience with this or know what to do to get past these errors?
Full log:
 ~/j/s/stx1alpha-signals/d/backend on   master !6 ?1 ❯ pip install
pythonnet==2.5.2 
stx1alpha at  10:52:05 AM Collecting pythonnet==2.5.2 Using cached
pythonnet-2.5.2.tar.gz (1.9 MB) Preparing metadata (setup.py) ...
done Requirement already satisfied: pycparser in
/home/jessica-ryan/jessica-ryan/stx1alpha/.venv/lib/python3.8/site-packages
(from pythonnet==2.5.2) (2.20) Building wheels for collected packages:
pythonnet Building wheel for pythonnet (setup.py) ... error ERROR:
Command errored out with exit status 1: command:
/home/jessica-ryan/jessica-ryan/stx1alpha/.venv/bin/python -u -c
'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';
file='"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
bdist_wheel -d /tmp/pip-wheel-789kx5l4
cwd: /tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/
Complete output (153 lines): running bdist_wheel running build
running build_ext Checking for updates from
https://www.nuget.org/api/v2/. Currently running NuGet.exe 4.1.0.
Updating NuGet.exe to 5.11.0. Update successful. MSBuild
auto-detection: using msbuild version '14.0' from
'/usr/lib/mono/xbuild/14.0/bin'.
xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
MSBUILD: error MSBUILD0004: Too many project files specified
WARNING: Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects
will be skipped, only packages.config files will be restored.
Restoring NuGet package System.ValueTuple.4.5.0. Restoring NuGet
package NUnit.ConsoleRunner.3.11.1. Restoring NuGet package
NUnit.3.12.0. Restoring NuGet package UnmanagedExports.1.2.7.
Adding package 'NUnit.3.12.0' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Adding package 'System.ValueTuple.4.5.0' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Adding package 'UnmanagedExports.1.2.7' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Adding package 'NUnit.ConsoleRunner.3.11.1' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Added package 'UnmanagedExports.1.2.7' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Added package 'System.ValueTuple.4.5.0' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Added package 'NUnit.ConsoleRunner.3.11.1' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages' Added package 'NUnit.3.12.0' to folder
'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/packages'
NuGet Config files used:
/home/jessica-ryan/.config/NuGet/NuGet.Config
Feeds used:
/home/jessica-ryan/.nuget/packages/
https://api.nuget.org/v3/index.json
Installed:
4 package(s) to packages.config projects
xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0 Mono, Version 6.8.0.105 Copyright (C) 2005-2013 Various Mono authors
Build started 11/18/2021 10:53:28. __________________________________________________ Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln"
(Clean target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "ReleaseMono|x64".
Target Clean:
Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj"
(Clean target(s)):
Target CoreClean:
Deleting file '/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs'
Done building project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj".
The project 'clrmodule' is disabled for solution configuration 'ReleaseMono|x64'.
Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/testing/Python.Test.csproj"
(Clean target(s)):
Target CoreClean:
Deleting file '/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/testing/obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs'
Done building project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/testing/Python.Test.csproj".
Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/embed_tests/Python.EmbeddingTest.csproj"
(Clean target(s)):
Target CoreClean:
Deleting file '/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/embed_tests/obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs'
Done building project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/embed_tests/Python.EmbeddingTest.csproj".
Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/console/Console.csproj"
(Clean target(s)):
Target CoreClean:
Deleting file '/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/console/obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs'
Done building project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/console/Console.csproj".
Done building project
"/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln".
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.3407830
xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
XBuild Engine Version 14.0 Mono, Version 6.8.0.105 Copyright (C) 2005-2013 Various Mono authors
Build started 11/18/2021 10:53:29. __________________________________________________ Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln"
(Build target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "ReleaseMono|x64".
Target Build:
Project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj"
(default target(s)):
Target PrepareForBuild:
Configuration: ReleaseMono Platform: x64
Created directory "bin/"
Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+
/out:obj/x64/ReleaseMono/Python.Runtime.dll
/resource:obj/x64/ReleaseMono/Python.Runtime.resources.clr.py,clr.py
Codecs/EncoderGroup.cs Codecs/DecoderGroup.cs
Codecs/RawProxyEncoder.cs Codecs/TupleCodecs.cs converterextensions.cs
finalizer.cs Properties/AssemblyInfo.cs ../SharedAssemblyInfo.cs
arrayobject.cs assemblymanager.cs BorrowedReference.cs classderived.cs
classbase.cs classmanager.cs classobject.cs clrobject.cs
codegenerator.cs constructorbinder.cs constructorbinding.cs
converter.cs CustomMarshaler.cs debughelper.cs delegatemanager.cs
delegateobject.cs eventbinding.cs eventobject.cs exceptions.cs
extensiontype.cs fieldobject.cs generictype.cs genericutil.cs
importhook.cs indexer.cs interfaceobject.cs interfaces.cs interop.cs
iterator.cs managedtype.cs metatype.cs methodbinder.cs
methodbinding.cs methodobject.cs methodwrapper.cs
modulefunctionobject.cs moduleobject.cs modulepropertyobject.cs
nativecall.cs NewReference.cs NonCopyableAttribute.cs overload.cs
propertyobject.cs pyansistring.cs pydict.cs PyExportAttribute.cs
pyfloat.cs pyint.cs pyiter.cs pylist.cs pylong.cs pynumber.cs
pyobject.cs pyscope.cs pysequence.cs pystring.cs pythonengine.cs
pythonexception.cs pytuple.cs ReferenceExtensions.cs runtime.cs
typemanager.cs typemethod.cs Util.cs platform/Types.cs
platform/LibraryLoader.cs polyfill/ReflectionPolifills.cs
slots/mp_length.cs interop38.cs
obj/x64/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs
/target:library /unsafe+
/define:"PYTHON38;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED"
/nowarn:1591 /doc:bin/Python.Runtime.xml /langversion:7.3 /nostdlib
/reference:/usr/lib/mono/4.0-api/System.dll
/reference:/usr/lib/mono/4.0-api/System.Core.dll
/reference:/usr/lib/mono/4.0-api//mscorlib.dll CSC: error CS1617:
Invalid -langversion option 7.3'. It must be ISO-1', `ISO-2',
Default, Latest or value in range 1 to 7.2
Task "Csc" execution -- FAILED
Done building target "CoreCompile" in project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj".--
FAILED
Done building project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj".--
FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln".-- FAILED Done building project
"/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln".-- FAILED
Build FAILED. Errors:
/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/pythonnet.sln
(Build) -> (Build target) ->
/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/src/runtime/Python.Runtime.csproj
(default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile
target) ->
CSC: error CS1617: Invalid -langversion option `7.3'. It must be `ISO-1', `ISO-2', Default, Latest or value in range 1 to 7.2
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.3647620 Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py",
line 630, in
setup(
File "/home/jessica-ryan/jessica-ryan/stx1alpha/.venv/lib/python3.8/site-packages/setuptools/init.py",
line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py",
line 612, in run
return bdist_wheel.bdist_wheel.run(self)
File "/home/jessica-ryan/jessica-ryan/stx1alpha/.venv/lib/python3.8/site-packages/wheel/bdist_wheel.py",
line 299, in run
self.run_command('build')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py",
line 353, in build_extension
subprocess.check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'xbuild pythonnet.sln
/p:Configuration=ReleaseMono /p:Platform=x64
/p:DefineConstants="PYTHON38%3BPYTHON3%3BUCS4%3BMONO_LINUX%3BPYTHON_WITHOUT_ENABLE_SHARED"
/p:PythonBuildDir="/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/build/lib.linux-x86_64-3.8"
/p:PythonInteropFile="interop38.cs" /p:PackageId=pythonnet_py38_x64
/verbosity:normal /t:Build' returned non-zero exit status 1.
---------------------------------------- ERROR: Failed building wheel for pythonnet Running setup.py clean for pythonnet Failed to
build pythonnet Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: /home/jessica-ryan/jessica-ryan/stx1alpha/.venv/bin/python -u -c
'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';
file='"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
install --record /tmp/pip-record-2fxmdkst/install-record.txt
--single-version-externally-managed --compile --install-headers /home/jessica-ryan/jessica-ryan/stx1alpha/.venv/include/site/python3.8/pythonnet
cwd: /tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
---------------------------------------- ERROR: Command errored out with exit status 1:
/home/jessica-ryan/jessica-ryan/stx1alpha/.venv/bin/python -u -c
'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';
file='"'"'/tmp/pip-install-mlymh9lo/pythonnet_eef24e9bf71f4dcdacdc5897c9504adf/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
install --record /tmp/pip-record-2fxmdkst/install-record.txt
--single-version-externally-managed --compile --install-headers /home/jessica-ryan/jessica-ryan/stx1alpha/.venv/include/site/python3.8/pythonnet
Check the logs for full command output.
You need a newer version of Mono. The one you have does not support C# 7.3 that Pythonnet build needs.

Error pip installing wheel file from github repository (to download pycocotools)

I am installing Tensorflow (1.15.0) in order to perform some deep learning object detection, but am having trouble pip installing pycocotools. I am following this tutorial, which is an updated tutorial originally from YouTube channel Sentdex. I am also using the Anaconda Prompt for this purpose.
After creating and activating a conda environment and installing all the needed packages (TensorFlow, lxml, etc.), I am trying to run the command pip install pycocotools package, but get the following error:
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\anaconda3\envs\object\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\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:\AppData\Local\Temp\pip-wheel-au01c73g'
cwd: C:\AppData\Local\Temp\pip-install-f_16w712\pycocotools\
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
C:\anaconda3\envs\object\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\AppData\Local\Temp\pip-install-f_16w712\pycocotools\pycocotools\_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
Running setup.py install for pycocotools ... error
ERROR: Command errored out with exit status 1:
command: 'C:\anaconda3\envs\object\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\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:\AppData\Local\Temp\pip-record-bjfh6urg\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\anaconda3\envs\object\Include\pycocotools'
cwd: C:\AppData\Local\Temp\pip-install-f_16w712\pycocotools\
Complete output (14 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
building 'pycocotools._mask' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\anaconda3\envs\object\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\AppData\\Local\\Temp\\pip-install-f_16w712\\pycocotools\\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:\AppData\Local\Temp\pip-record-bjfh6urg\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\anaconda3\envs\object\Include\pycocotools' Check the logs for full command output.
Apparently, there is a wheel file that needs to be downloaded from this github repository, under the subdirectory PythonAPI. I ran this code to do so:
pip install git+https://github.com/philferriere/cocoapi#egg=pycocotools^subdirectory==PythonAPI
The following error is produced:
Collecting pycocotoolssubdirectory==PythonAPI
Cloning https://github.com/philferriere/cocoapi to c:\appdata\local\temp\pip-install-c_lq0qhi\pycocotoolssubdirectory
ERROR: Command errored out with exit status 1:
command: 'C:\anaconda3\envs\object\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\AppData\\Local\\Temp\\pip-install-c_lq0qhi\\pycocotoolssubdirectory\\setup.py'"'"'; __file__='"'"'C:\\AppData\\Local\\Temp\\pip-install-c_lq0qhi\\pycocotoolssubdirectory\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\AppData\Local\Temp\pip-pip-egg-info-0mcbi3nr'
cwd: C:\AppData\Local\Temp\pip-install-c_lq0qhi\pycocotoolssubdirectory\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\anaconda3\envs\object\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\AppData\\Local\\Temp\\pip-install-c_lq0qhi\\pycocotoolssubdirectory\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
How can I successfully install this repository? I need the wheel file so that I can proceed with the pycocotools installation. Note: I have installed the latest version of pip, so that isn't the issue.
Try running it as follows:
pip install pycocotools-windows
as suggested here.

error deploying scrapyd project

when trying to execute this command:
scrapyd-deploy test -p project=myProject
I get the following error:
Traceback (most recent call last):
File "/usr/bin/scrapyd-deploy", line 269, in <module>
main()
File "/usr/bin/scrapyd-deploy", line 95, in main
egg, tmpdir = _build_egg()
File "/usr/bin/scrapyd-deploy", line 236, in _build_egg
retry_on_eintr(check_call, [sys.executable, 'setup.py', 'clean', '-a', 'bdist_egg', '-d', d], stdout=o, stderr=e)
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/python.py", line 331, in retry_on_eintr
return function(*args, **kw)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', 'setup.py', 'clean', '-a', 'bdist_egg', '-d', '/tmp/scrapydeploy-wV3h4k']' returned non-zero exit status 1
I have installed scrapyd-deploy and scrapyd-client, as well as setuptools and scrapyd of course.
This command:
python setup.py clean -a bdist_egg
produces the output:
running clean
removing 'build/lib.linux-x86_64-2.7' (and everything under it)
removing 'build/bdist.linux-x86_64' (and everything under it)
'build/scripts-2.7' does not exist -- can't clean it
removing 'build'
running bdist_egg
running egg_info
writing NOAA.egg-info/PKG-INFO
writing top-level names to NOAA.egg-info/top_level.txt
writing dependency_links to NOAA.egg-info/dependency_links.txt
writing entry points to NOAA.egg-info/entry_points.txt
reading manifest file 'NOAA.egg-info/SOURCES.txt'
writing manifest file 'NOAA.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/NOAA
copying NOAA/pipelines.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/__init__.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/noaa-template.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/noaa-original.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/settings-template.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/tika-python.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/settings.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/mysqldb.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/noaa.py -> build/lib.linux-x86_64-2.7/NOAA
copying NOAA/items.py -> build/lib.linux-x86_64-2.7/NOAA
creating build/lib.linux-x86_64-2.7/NOAA/spiders
copying NOAA/spiders/spider1.py -> build/lib.linux-x86_64-2.7/NOAA/spiders
copying NOAA/spiders/spider2.py -> build/lib.linux-x86_64-2.7/NOAA/spiders
(output omitted... There are a lot of spiders)
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/NOAA
copying build/lib.linux-x86_64-2.7/NOAA/pipelines.py -> build/bdist.linux-x86_64/egg/NOAA
creating build/bdist.linux-x86_64/egg/NOAA/spiders
copying build/lib.linux-x86_64-2.7/NOAA/spiders/spider1.py -> build/bdist.linux-x86_64/egg/NOAA/spiders
copying build/lib.linux-x86_64-2.7/NOAA/spiders/spider2.py -> build/bdist.linux-x86_64/egg/NOAA/spiders
(output omitted... There are a lot of spiders)
byte-compiling build/bdist.linux-x86_64/egg/NOAA/pipelines.py to pipelines.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/spiders/spider1.py to spider1.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/spiders/spider2.py to spider2.pyc
(output omitted... There are a lot of spiders)
byte-compiling build/bdist.linux-x86_64/egg/NOAA/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/noaa-template.py to noaa-template.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/noaa-original.py to noaa-original.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/settings-template.py to settings-template.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/tika-python.py to tika-python.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/settings.py to settings.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/mysqldb.py to mysqldb.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/noaa.py to noaa.pyc
byte-compiling build/bdist.linux-x86_64/egg/NOAA/items.py to items.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying NOAA.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NOAA.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NOAA.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NOAA.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying NOAA.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/NOAA-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
When trying to schedule a spider with this command:
curl http://localhost:6800/schedule.json -d project=myproject -d spider=spider1.py
I get this error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/web
req.requestReceived(command, path, version)
File "/usr/local/lib/python2.7/dist-packages/twisted/web
self.process()
File "/usr/local/lib/python2.7/dist-packages/twisted/web
self.render(resrc)
File "/usr/local/lib/python2.7/dist-packages/twisted/web
body = resrc.render(self)
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/scrapyd/web
return JsonResource.render(self, txrequest)
File "/usr/local/lib/python2.7/dist-packages/scrapyd/uti
r = resource.Resource.render(self, txrequest)
File "/usr/local/lib/python2.7/dist-packages/twisted/web
return m(request)
File "/usr/local/lib/python2.7/dist-packages/scrapyd/web
spiders = get_spider_list(project)
File "/usr/local/lib/python2.7/dist-packages/scrapyd/uti
runner = Config().get('runner')
File "/usr/local/lib/python2.7/dist-packages/scrapyd/con
self.cp.read(sources)
File "/usr/lib/python2.7/ConfigParser.py", line 305, in
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no s
file: /etc/scrapyd/conf.d/twistd.pid, line: 1
'24262'
Funny thing is, if I add what I believe to be a section header ([section header])to that twistd.pid file, I get an error saying that it contains something other than a numerical value of the pid of twistd.
Are these issues interrelated?
I was getting the same error .. what worked for me was using the command with sudo.
The error might be because the command is not getting the proper permissions.
sudo scrapyd-deploy test -p project=myProject

installing lxml on 64 bit windows

So I'm trying to install lxml on my machine, and I can't seem to get it to work.
I've got Windows 8.1 64-bit and python 3.5
I've used both
pip install lxml
and
easy_install lxml
I keep getting this error message:
C:\Users\jgarber\Downloads>pip install readability-lxml --upgrade Requirement already up-to-date: readability-lxml in c:\python\lib\site-packages\ readability_lxml-0.6.2-py3.5.egg Requirement already up-to-date: chardet in c:\python\lib\site-packages (from rea dability-lxml) Collecting lxml (from readability-lxml) Using cached lxml-3.6.4.tar.gz Requirement already up-to-date: cssselect in c:\python\lib\site-packages\csssele ct-1.0.0-py3.5.egg (from readability-lxml) Installing collected packages: lxml Running setup.py install for lxml ... error
Complete output from command c:\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jgarber\\AppData\\Local\\Temp\\pip-build-bypbiu8j\ \lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().r eplace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\jgarber\AppD ata\Local\Temp\pip-j8svsde4-record\install-record.txt
--single-version-externall y-managed --compile:
Building lxml version 3.6.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command, \r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\lxml
copying src\lxml\builder.py -> build\lib.win32-3.5\lxml
copying src\lxml\cssselect.py -> build\lib.win32-3.5\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-3.5\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-3.5\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-3.5\lxml
copying src\lxml\sax.py -> build\lib.win32-3.5\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-3.5\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-3.5\lxml
copying src\lxml\__init__.py -> build\lib.win32-3.5\lxml
creating build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win32-3.5\lxml\includes
creating build\lib.win32-3.5\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-3.5\lxml\html
creating build\lib.win32-3.5\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.5\lxml\isosc hematron
copying src\lxml\lxml.etree.h -> build\lib.win32-3.5\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win32-3.5\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-3.5\lxml\includ es
copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-3.5\lxml\include s
copying src\lxml\includes\relaxng.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win32-3.5\lxml\include s
copying src\lxml\includes\tree.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.win32-3.5\lxml\include s
creating build\lib.win32-3.5\lxml\isoschematron\resources
creating build\lib.win32-3.5\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib .win32-3.5\lxml\isoschematron\resources\rng
creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win 32-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win 32-3.5\lxml\isoschematron\resources\xsl
creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron
-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstra ct_expand.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schema tron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_i nclude.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematro n-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema tron_message.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-sch ematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema tron_skeleton_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\ xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_f or_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schemat ron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt
-> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\src
creating build\temp.win32-3.5\Release\src\lxml
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc\lxml\includes
-Ic:\python\include -Ic:\python\in clude "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\P rogram Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program File s (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\
8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc \lxml\lxml.etree.c /Fobuild\temp.win32-3.5\Release\src\lxml\lxml.etree.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
lxml.etree.c
src\lxml\includes\etree_defs.h(14): fatal error C1083: Cannot open include f ile: 'libxml/xmlversion.h': No such file or directory
Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14 .0\\VC\\BIN\\cl.exe' failed with exit status 2
creating Users
creating Users\jgarber
creating Users\jgarber\AppData
creating Users\jgarber\AppData\Local
creating Users\jgarber\AppData\Local\Temp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Micro soft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\in clude\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shar ed" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files ( x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\jgarber\AppData\Local\Temp\xmlX PathInit_qrahzea.c /FoUsers\jgarber\AppData\Local\Temp\xmlXPathInit_qrahzea.obj
xmlXPathInit_qrahzea.c
C:\Users\jgarber\AppData\Local\Temp\xmlXPathInit_qrahzea.c(1): fatal error C 1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
****************************************************************************
*****
Could not find function xmlCheckVersion in library libxml2. Is libxml2 insta lled?
****************************************************************************
*****
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B IN\\cl.exe' failed with exit status 2
---------------------------------------- Command "c:\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\U sers\\jgarber\\AppData\\Local\\Temp\\pip-build-bypbiu8j\\lxml\\setup.py';exec(co mpile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __ file__, 'exec'))" install --record C:\Users\jgarber\AppData\Local\Temp\pip-j8svs de4-record\install-record.txt --single-version-externally-managed
--compile" fai led with error code 1 in C:\Users\jgarber\AppData\Local\Temp\pip-build-bypbiu8j\ lxml\
I have also tried downloading the .whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and attempted to manually install the wheel but receive this error message:
C:\Users\jgarber\Downloads>pip install lxml-3.6.4-cp35-cp35m-win_amd64.whl
lxml-3.6.4-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
even with the python -m pip install statement.
At this point I'm not sure what I'm missing, any help would be greatly appreciated.
By default, Python will install as 32-bit on Windows, even on 64-bit systems. Therefore, to match this, you must select the wheel for 32-bit systems.
You can verify that your Python interpreter is 32-bit, because the REPL will look like this when starting:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
You should pick the lxml-3.6.4-cp35-cp35m-win32.whl package for Python 3.5 on Windows (unless you explicitly selected 64-bit when downloading Python) which should solve your issue.
They fixed this issue as of lxml version 4.2.5.
If you are still getting this issue, see if your requirements file specifies a specific version of lxml. If so, you should be able to fix the problem by updating the specified version to 4.2.5 or above.

Install NumPy for Python 3.2.3 on OS X 10.7.4

I have been trying for months to get numpy installed for Python 3 but despite copious amounts of Googling and even posting to the numpy mailing list I am still no closer to a solution.
I have managed to get it installed via MacPorts but unfortunately there doesn't appear to be a port of MatPlotLib for Python 3 which is the main reason I am trying to install numpy...so I am a bit stuck...
I keep getting the same error whilst trying to build from the setup.py file. I have included the terminal output below.
Thanks for any help you can offer,
Adam.
Here is the terminal output:
lipo: can't figure out the architecture type of: /var/folders/zj/7xymy_2n3s71ws30v3v_qnlw0000gn/T//ccbRr0Hj.out
failure.
removing: _configtest.c _configtest.o
Running from numpy source directory.Traceback (most recent call last):
File "setup.py", line 214, in <module>
setup_package()
File "setup.py", line 207, in setup_package
configuration=configuration )
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/core.py", line 186, in setup
return old_setup(**new_attr)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build.py", line 37, in run
old_build.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 152, in run
self.build_sources()
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 169, in build_sources
self.build_extension_sources(ext)
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 328, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 385, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 410, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 41, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 271, in check_types
"Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
Well, I finally managed to get NumPy to install. Not sure it is the best method but it seems to work!
First of all i needed to install distribute:
curl http://python-distribute.org/distribute_setup.py | python3
Then I installed pip:
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python3
After that I had to get pip on to my system path (again there are probably better ways):
Open Terminal
Type the following (single line):
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.2/bin/pip /usr/local/bin
With distribute and pip installed I then installed Nose, which NumPy needs for testing or something:
Again, in Terminal type the following:
pip install nose
Now I needed to make sure I had the latest version of Xcode:
From the AppStore install the latest version of Xcode
If you still have a /Developer folder then rename it Developer-old (not sure whether this will cause problems for me later or not)
Open Terminal and create a symlink to the AppStore version of Xcode (single line):
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer
With all of that out of the way time to install NumPy:
Download the NumPy source from: http://sourceforge.net/projects/numpy/files/NumPy/1.6.2rc1/
Unarchive the file
Open Terminal again:
cd into the directory created by unarchiving the file e.g.
cd /Users/username/Downloads/numpy-1.6.2rc1
Type into the Terminal the following to change the complier used to build NumPy:
export CC=clang
export CXX=clang
export FFLAGS=-ff2c
export LDSHARED='clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' (this is a single line)
python3 setup.py build (this may take a while)
python3 setup.py install
Okay, assuming there were no errors NumPy should be installed. Time to test it out:
Open IDLE
In the Python Shell type:
import numpy
numpy.test('full')
This will test NumPy the final result I received with Python 3.2.3 was:
<nose.result.TextTestResult run=3192 errors=0 failures=1>
So the NumPy installation passes all except one test, which seems pretty good. I haven't had a chance to see if works properly yet as I am still struggling to get matplotlib installed...
Hope these instructions are useful to somebody!
Adam.
I'm using Python 3.3 and OS X 10.7, and I installed numpy using a much easier method than above. I'm posting here in case it can help someone.
Follow these steps:
Download the zip file from numpy on github, and unpack it wherever you want.
Open a terminal and cd to the directory
enter the command python3 setup.py build --fcompiler=gnu95 (requires gfortran. Enter gfortran -v to see if you've got it, I've got version 4.6.2)
enter python3 setup.py install
That's all it took for me. Running numpy.test('full') gives me some errors, however: http://pastebin.com/5XF0qAe5
I don't know what kind of errors I'm going to experience yet.
The above answer worked great for me, except that you mentioned this was for OS X 10.7 (same here) so my build command did complain about the line:
export LDSHARED='clang -bundle -undefined dynamic_lookup -arch i386
-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' (this is a single line)
So, I just changed that to 10.7 and it worked fine. Apparently, for OS X 10.7, the /Developer/SDKs/ directory contains MacOSX10.7.sdk and MacOSX10.8.sdk. Thanks for the great answer!
I've come back to this answer a number of times, if you're using 10.8, you need to do a few things to get this to work (but I don't think you need the LDSHARED part).
Install XCode from Apple as well as the command line tools (this gets you the compilers you need).
set environment variables to point to clang and use easy_install (NOT distribute) to install, this line will work:
CC=clang CXX=clang FFLAGS=-ff2c easy_install numpy
Do not try to install other packages at the same time. The numpy install may exit claiming an error, but often it manages to install itself anyways (for example, if you try to install in a virtualenv, this may happen).
for me i installed python3 from their website and then to install numpy,
pip3 install numpy
it works!