CityFlow
CityFlow copied to clipboard
Install failed Problem
I followed the Installation Guide and Build From Source:
- my python version is 3.7
- Install cpp dependencies:
sudo apt update && sudo apt install -y build-essential cmake
- Clone CityFlow project from github:
- Go to CityFlow project’s root directory and run, I meet install problem, the info as follow
if I run pip install .
Error info:
`Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Processing /home/csu2020/disk2/xzx/rtgatsc/CityFlow
Preparing metadata (setup.py) ... done
Building wheels for collected packages: CityFlow
Building wheel for CityFlow (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/csu2020/disk1/anaconda3/envs/env_rtgatsc/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py'"'"'; file='"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/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-ja5oxqqu
cwd: /home/csu2020/disk2/xzx/rtgatsc/CityFlow/
Complete output (43 lines):
running bdist_wheel
running build
running build_ext
-- Submodule update, this may take some time...
CMake Error at CMakeLists.txt:51 (message):
The submodule extern/pybind11/CMakeLists.txt was not downloaded!
GIT_SUBMODULE was turned off or failed. Please update submodules and try
again.
-- Configuring incomplete, errors occurred!
See also "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 69, in
zip_safe=False
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 32, in run
self.build_extension(ext)
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/csu2020/disk2/xzx/rtgatsc/CityFlow', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/csu2020/disk2/xzx/rtgatsc/CityFlow/build/lib.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/bin/python', '-DVERSION="0.1"', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
ERROR: Failed building wheel for CityFlow Running setup.py clean for CityFlow Failed to build CityFlow Installing collected packages: CityFlow Running setup.py install for CityFlow ... error ERROR: Command errored out with exit status 1: command: /home/csu2020/disk1/anaconda3/envs/env_rtgatsc/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py'"'"'; file='"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/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-qtpciaed/install-record.txt --single-version-externally-managed --compile --install-headers /home/csu2020/disk1/anaconda3/envs/env_rtgatsc/include/python3.7m/CityFlow cwd: /home/csu2020/disk2/xzx/rtgatsc/CityFlow/ Complete output (59 lines): running install running build running build_ext -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Submodule update, this may take some time... CMake Error at CMakeLists.txt:51 (message): The submodule extern/pybind11/CMakeLists.txt was not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.
-- Configuring incomplete, errors occurred!
See also "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 69, in <module>
zip_safe=False
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 32, in run
self.build_extension(ext)
File "/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/csu2020/disk2/xzx/rtgatsc/CityFlow', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/csu2020/disk2/xzx/rtgatsc/CityFlow/build/lib.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/csu2020/disk1/anaconda3/envs/env_rtgatsc/bin/python', '-DVERSION="0.1"', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/csu2020/disk1/anaconda3/envs/env_rtgatsc/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/setup.py'"'"'; file='"'"'/home/csu2020/disk2/xzx/rtgatsc/CityFlow/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-qtpciaed/install-record.txt --single-version-externally-managed --compile --install-headers /home/csu2020/disk1/anaconda3/envs/env_rtgatsc/include/python3.7m/CityFlow Check the logs for full command output.`
Please help me solve this problem
我之前碰到过类似的错误,我当时是服务器没联网。你可以用firefox &
打开火狐检查一下,如果是校园网的话可能要在火狐登录一下。另外从github下载的时候要在git用git clone
命令,不能直接下载压缩包,不然会少一个文件。
- Please check if your network works well, using
firefox &
- You should use
git clone
command instead of directly downloading the .zip file from the web.
CityFlow relies on two external submodules [pybind11] and [rapidjson], please check if you have [git] installed. If [git] is properly installed, try running git submodule update --init manually then run pip install .
我之前碰到过类似的错误,我当时是服务器没联网。你可以用
firefox &
打开火狐检查一下,如果是校园网的话可能要在火狐登录一下。另外从github下载的时候要在git用git clone
命令,不能直接下载压缩包,不然会少一个文件。
- Please check if your network works well, using
firefox &
- You should use
git clone
command instead of directly downloading the .zip file from the web.
Thanks! It helps me!