error during installation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

error during installation

JeremyB
Hello

  I tried to install Owlready2 (version 0.22) on windows10 but I got the following error : TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

  I already tried installation using a local archive or a previous version of Owlready2 (version 0.21), both using pip or pip3.

  Any insight would be appreciated.

ps : python version 3.7.3
Reply | Threaded
Open this post in threaded view
|

Re: error during installation

Jiba
Administrator
Hi,

Do you have a complete traceback with the error? I would like to know which path is causing problem.

Another question: do you have Cython installed? If Cython is installed, Owlready setup will build the C optimized module, but it requires a working C compiler. If Cython is not installed,  this module is not built and thus the installation is simpler.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: error during installation

JeremyB
This post was updated on .
I manually installed Owlready2 without problem. It seems I can still get the same error using "pip install Owlready2", you'll find the complete traceback below.

I do have Cython installed: version 0.29.14 but I'm not sure for the C compiler, I'll check.

ERROR: Command errored out with exit status 1:
     command: 'd:\logiciels\python_3_7_3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jerem\\AppData\\Local\\Temp\\pip-install-5i94e8_6\\Owlready2\\setup.py'"'"'; __file__='"'"'C:\\Users\\jerem\\AppData\\Local\\Temp\\pip-install-5i94e8_6\\Owlready2\\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\jerem\AppData\Local\Temp\pip-record-3cubajny\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\jerem\AppData\Local\Temp\pip-install-5i94e8_6\Owlready2\
    Complete output (161 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\owlready2
    copying .\annotation.py -> build\lib.win-amd64-3.7\owlready2
    copying .\base.py -> build\lib.win-amd64-3.7\owlready2
    copying .\class_construct.py -> build\lib.win-amd64-3.7\owlready2
    copying .\close.py -> build\lib.win-amd64-3.7\owlready2
    copying .\disjoint.py -> build\lib.win-amd64-3.7\owlready2
    copying .\driver.py -> build\lib.win-amd64-3.7\owlready2
    copying .\editor.py -> build\lib.win-amd64-3.7\owlready2
    copying .\entity.py -> build\lib.win-amd64-3.7\owlready2
    copying .\individual.py -> build\lib.win-amd64-3.7\owlready2
    copying .\instance_editor.py -> build\lib.win-amd64-3.7\owlready2
    copying .\instance_editor_qt.py -> build\lib.win-amd64-3.7\owlready2
    copying .\namespace.py -> build\lib.win-amd64-3.7\owlready2
    copying .\ntriples_diff.py -> build\lib.win-amd64-3.7\owlready2
    copying .\observe.py -> build\lib.win-amd64-3.7\owlready2
    copying .\owlxml_2_ntriples.py -> build\lib.win-amd64-3.7\owlready2
    copying .\prop.py -> build\lib.win-amd64-3.7\owlready2
    copying .\rdflib_store.py -> build\lib.win-amd64-3.7\owlready2
    copying .\rdfxml_2_ntriples.py -> build\lib.win-amd64-3.7\owlready2
    copying .\reasoning.py -> build\lib.win-amd64-3.7\owlready2
    copying .\rply.py -> build\lib.win-amd64-3.7\owlready2
    copying .\rule.py -> build\lib.win-amd64-3.7\owlready2
    copying .\triplelite.py -> build\lib.win-amd64-3.7\owlready2
    copying .\util.py -> build\lib.win-amd64-3.7\owlready2
    copying .\__init__.py -> build\lib.win-amd64-3.7\owlready2
    creating build\lib.win-amd64-3.7\owlready2\pymedtermino2
    copying .\pymedtermino2\icd10_french.py -> build\lib.win-amd64-3.7\owlready2\pymedtermino2
    copying .\pymedtermino2\model.py -> build\lib.win-amd64-3.7\owlready2\pymedtermino2
    copying .\pymedtermino2\umls.py -> build\lib.win-amd64-3.7\owlready2\pymedtermino2
    copying .\pymedtermino2\__init__.py -> build\lib.win-amd64-3.7\owlready2\pymedtermino2
    copying .\owlready_ontology.owl -> build\lib.win-amd64-3.7\owlready2
    creating build\lib.win-amd64-3.7\owlready2\hermit
    copying .\hermit\HermiT.jar -> build\lib.win-amd64-3.7\owlready2\hermit
    copying .\hermit\readme.txt -> build\lib.win-amd64-3.7\owlready2\hermit
    creating build\lib.win-amd64-3.7\owlready2\hermit\org
    creating build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb
    creating build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$1.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$10.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$11.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$2.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$3.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$4.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$5.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$6.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$7.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$8.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$9.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$OntologyChangeListener.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner$ReasonerFactory.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    copying .\hermit\org\semanticweb\HermiT\Reasoner.java -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT
    creating build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\Arg.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$Action.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$ClassifyAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$DumpClausesAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$DumpPrefixesAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$EntailsAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$EquivalentsAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$SatisfiabilityAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$StatusOutput.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$SubsAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$SupersAction.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine$UsageException.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\CommandLine.java -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\Option$1.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    copying .\hermit\org\semanticweb\HermiT\cli\Option.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\cli
    creating build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\HierarchyDumperFSS$AtomicConceptComparator.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\HierarchyDumperFSS$DataRoleComparator.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\HierarchyDumperFSS$ObjectRoleComparator.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\HierarchyDumperFSS.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\HierarchyDumperFSS.java -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\InstanceManager$1.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\InstanceManager.class -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    copying .\hermit\org\semanticweb\HermiT\hierarchy\InstanceManager.java -> build\lib.win-amd64-3.7\owlready2\hermit\org\semanticweb\HermiT\hierarchy
    creating build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\antlr-3.2.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\antlr-runtime-3.2.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\aterm-java-1.6.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\commons-codec-1.6.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\httpclient-4.2.3.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\httpcore-4.2.2.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jcl-over-slf4j-1.6.4.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jena-arq-2.10.0.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jena-core-2.10.0.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jena-iri-0.9.5.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jena-tdb-0.10.0.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\jgrapht-jdk1.5.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\LICENSE.txt -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\log4j-1.2.16.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\owlapi-distribution-3.4.3-bin.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\pellet-2.3.1.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\slf4j-api-1.6.4.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\slf4j-log4j12-1.6.4.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\xercesImpl-2.10.0.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    copying .\pellet\xml-apis-1.4.01.jar -> build\lib.win-amd64-3.7\owlready2\pellet
    creating build\lib.win-amd64-3.7\owlready2\pellet\org
    creating build\lib.win-amd64-3.7\owlready2\pellet\org\mindswap
    creating build\lib.win-amd64-3.7\owlready2\pellet\org\mindswap\pellet
    creating build\lib.win-amd64-3.7\owlready2\pellet\org\mindswap\pellet\taxonomy
    creating build\lib.win-amd64-3.7\owlready2\pellet\org\mindswap\pellet\taxonomy\printer
    copying .\pellet\org\mindswap\pellet\taxonomy\printer\ClassTreePrinter.java -> build\lib.win-amd64-3.7\owlready2\pellet\org\mindswap\pellet\taxonomy\printer
    running build_ext
    building 'owlready2_optimized' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jerem\AppData\Local\Temp\pip-install-5i94e8_6\Owlready2\setup.py", line 74, in <module>
        ext_modules = extensions,
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "d:\logiciels\python_3_7_3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "d:\logiciels\python_3_7_3\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "d:\logiciels\python_3_7_3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "d:\logiciels\python_3_7_3\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "d:\logiciels\python_3_7_3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\logiciels\python_3_7_3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "d:\logiciels\python_3_7_3\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "d:\logiciels\python_3_7_3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "d:\logiciels\python_3_7_3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
        _build_ext.run(self)
      File "d:\logiciels\python_3_7_3\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "d:\logiciels\python_3_7_3\lib\distutils\command\build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "d:\logiciels\python_3_7_3\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension
        _build_ext.build_extension(self, ext)
      File "d:\logiciels\python_3_7_3\lib\distutils\command\build_ext.py", line 534, in build_extension
        depends=ext.depends)
      File "d:\logiciels\python_3_7_3\lib\distutils\_msvccompiler.py", line 346, in compile
        self.initialize()
      File "d:\logiciels\python_3_7_3\lib\distutils\_msvccompiler.py", line 239, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "d:\logiciels\python_3_7_3\lib\site-packages\setuptools\msvc.py", line 1620, in return_env
        if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):
      File "d:\logiciels\python_3_7_3\lib\genericpath.py", line 30, in isfile
        st = os.stat(path)
    TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\logiciels\python_3_7_3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jerem\\AppData\\Local\\Temp\\pip-install-5i94e8_6\\Owlready2\\setup.py'"'"'; __file__='"'"'C:\\Users\\jerem\\AppData\\Local\\Temp\\pip-install-5i94e8_6\\Owlready2\\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\jerem\AppData\Local\Temp\pip-record-3cubajny\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Reply | Threaded
Open this post in threaded view
|

Re: error during installation

Jiba
Administrator
Hi,

It seems that the problem is related to the runtime redistributable files for MS Visual C++ (VCRuntimeRedist), but I am unable to tell more.

I've improved Owlready2 setup.py, so as if Cython installation fails for any reason, it will try a non-Cython installation (thus not requiring the C compiler).

Jiba