1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

OSMnxがインストール出来なくて苦労した話

Last updated at Posted at 2021-09-06

#OSMnx インストール方法
私がいつも使っていた環境でインストールしようとしたものの、
見事にインストール失敗。3日以上かかってしまいました...。
頑張ったので書いておきます。

決め手はこちらのサイトなりました。感謝

##環境
windows10   64bit home
Python    3.9.5  64bit

fiona     1.8.20
GDAL     3.2.2
rtree     0.9.4  ←あえてこのバージョンにした。
geopandas  0.9.0
osmnx    1.1.1
networkx   2.6.2

私の環境では以下が足りなかったです...
shapely   1.7.1
six     1.16.0
pyproj    3.2.0
descartes  1.1.0

OSmnxを使うときに必須になるパッケージが多数あります。

geopandas
rtree

geopandasインストールに必要なパッケージ

numpy
pandas (version 0.15.2 or later)
shapely
fiona
six
pyproj
descartes
####全てconda-forgeにしました。

最終環境
# packages in environment at C:\Users\mashiko\anaconda3\envs\notebook:
#
# Name                    Version                   Build  Channel
affine                    2.3.0                      py_0    conda-forge
argon2-cffi               20.1.0           py39h2bbff1b_1  
async_generator           1.10               pyhd3eb1b0_0  
attrs                     21.2.0             pyhd3eb1b0_0  
backcall                  0.2.0              pyhd3eb1b0_0  
bleach                    3.3.0              pyhd3eb1b0_0  
boost-cpp                 1.74.0               h5b4e17d_4    conda-forge
branca                    0.4.2              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py39hb82d6ee_1001    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.5.30            h5b45459_0    conda-forge
cairo                     1.16.0            hb19e0ff_1008    conda-forge
certifi                   2021.5.30        py39hcbf5309_0    conda-forge
cffi                      1.14.5           py39hcd4344a_0  
cfitsio                   3.470                h0af3d06_7    conda-forge
chardet                   4.0.0            py39hcbf5309_1    conda-forge
charset-normalizer        2.0.4                    pypi_0    pypi
click                     7.1.2              pyh9f0ad1d_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyhd3eb1b0_0  
cryptography              3.4.7            py39hd8d06c1_0    conda-forge
curl                      7.78.0               h789b8ee_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.7.1              pyhd3eb1b0_0  
descartes                 1.1.0                      py_4    conda-forge
entrypoints               0.3              py39haa95532_0  
expat                     2.4.1                h39d44d4_0    conda-forge
fiona                     1.8.20           py39h9f1b043_0    conda-forge
folium                    0.12.1                   pypi_0    pypi
fontconfig                2.13.1            h1989441_1005    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
freexl                    1.0.6                ha8e266a_0    conda-forge
gdal                      3.2.2            py39h6795fcd_7    conda-forge
geopandas                 0.9.0              pyhd8ed1ab_1    conda-forge
geopandas-base            0.9.0              pyhd8ed1ab_1    conda-forge
geos                      3.9.1                h39d44d4_2    conda-forge
geotiff                   1.6.0                ha8a8a2d_6    conda-forge
gettext                   0.19.8.1          h1a89ca6_1005    conda-forge
hdf4                      4.2.15               h0e5069d_3    conda-forge
hdf5                      1.10.6          nompi_h5268f04_1114    conda-forge
icu                       68.1                 h0e60522_0    conda-forge
idna                      3.2                      pypi_0    pypi
importlib-metadata        3.10.0           py39haa95532_0  
importlib_metadata        3.10.0               hd3eb1b0_0  
intel-openmp              2021.3.0          h57928b3_3372    conda-forge
ipykernel                 5.3.4            py39h7b7c402_0  
ipython                   7.22.0           py39hd4e2768_0  
ipython_genutils          0.2.0              pyhd3eb1b0_1  
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.17.2           py39haa95532_1  
jinja2                    3.0.0              pyhd3eb1b0_0  
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
jsonschema                3.2.0                      py_2  
jupyter_client            6.1.12             pyhd3eb1b0_0  
jupyter_core              4.7.1            py39haa95532_0  
jupyterlab_pygments       0.1.2                      py_0  
kealib                    1.4.14               h96bfa42_2    conda-forge
kiwisolver                1.3.2            py39h2e07f2f_0    conda-forge
krb5                      1.19.2               hbae68bd_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      2.2.1                h0e60522_0    conda-forge
libblas                   3.9.0              11_win64_mkl    conda-forge
libcblas                  3.9.0              11_win64_mkl    conda-forge
libcurl                   7.78.0               h789b8ee_0    conda-forge
libdeflate                1.7                  h8ffe710_5    conda-forge
libffi                    3.3                  h0e60522_2    conda-forge
libgdal                   3.2.2                ha6cada3_7    conda-forge
libglib                   2.68.4               h1e62bf3_0    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
libkml                    1.3.0             h9859afa_1014    conda-forge
liblapack                 3.9.0              11_win64_mkl    conda-forge
libnetcdf                 4.8.0           nompi_hf689e7d_103    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libpq                     13.3                 hfcc5ef8_0    conda-forge
librttopo                 1.1.0                hb340de5_6    conda-forge
libsodium                 1.0.18               h62dcd97_0  
libspatialindex           1.9.3                h39d44d4_4    conda-forge
libspatialite             5.0.1                h762a7f4_5    conda-forge
libssh2                   1.10.0               h680486a_0    conda-forge
libtiff                   4.3.0                h0c97f57_1    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libxml2                   2.9.12               hf5bbc77_0    conda-forge
libzip                    1.8.0                hfed4ece_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6  
m2w64-gcc-libs            5.3.0                         7  
m2w64-gcc-libs-core       5.3.0                         7  
m2w64-gmp                 6.1.0                         2  
m2w64-libwinpthread-git   5.0.0.4634.697f757               2  
mapclassify               2.4.3              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py39h2bbff1b_0  
matplotlib-base           3.4.3            py39h581301d_0    conda-forge
mistune                   0.8.4           py39h2bbff1b_1000  
mkl                       2021.3.0           hb70f87d_564    conda-forge
msys2-conda-epoch         20160418                      1  
munch                     2.5.0                      py_0    conda-forge
nbclient                  0.5.3              pyhd3eb1b0_0  
nbconvert                 6.0.7            py39haa95532_0  
nbformat                  5.1.3              pyhd3eb1b0_0  
nest-asyncio              1.5.1              pyhd3eb1b0_0  
networkx                  2.6.2              pyhd8ed1ab_0    conda-forge
notebook                  6.4.0            py39haa95532_0  
numpy                     1.21.2           py39h6635163_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
osmnx                     1.1.1              pyhd8ed1ab_0    conda-forge
packaging                 20.9               pyhd3eb1b0_0  
pandas                    1.3.2            py39h2e25243_0    conda-forge
pandoc                    2.12                 haa95532_0  
pandocfilters             1.4.3            py39haa95532_1  
parso                     0.7.0                      py_0  
pcre                      8.45                 h0e60522_0    conda-forge
pickleshare               0.7.5           pyhd3eb1b0_1003  
pillow                    8.3.2            py39h916092e_0    conda-forge
pip                       21.1.1           py39haa95532_0  
pixman                    0.40.0               h8ffe710_0    conda-forge
poppler                   21.03.0              h9ff6ed8_0    conda-forge
poppler-data              0.4.10                        0    conda-forge
postgresql                13.3                 h1c22c4f_0    conda-forge
proj                      8.0.1                h1cfcee9_0    conda-forge
prometheus_client         0.10.1             pyhd3eb1b0_0  
prompt-toolkit            3.0.17             pyh06a4308_0  
pycparser                 2.20                       py_2  
pygments                  2.9.0              pyhd3eb1b0_0  
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyhd3eb1b0_0  
pyproj                    3.2.0            py39ha996c60_0    conda-forge
pyrsistent                0.17.3           py39h2bbff1b_0  
pysocks                   1.7.1            py39hcbf5309_3    conda-forge
python                    3.9.5                h6244533_3  
python-dateutil           2.8.1              pyhd3eb1b0_0  
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pywin32                   228              py39he774522_0  
pywinpty                  0.5.7            py39haa95532_0  
pyzmq                     20.0.0           py39hd77b12b_1  
rasterio                  1.2.6            py39hb4f844e_1    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
rtree                     0.9.4            py39h09fdee3_2    conda-forge
scikit-learn              0.24.2           py39he931e04_1    conda-forge
scipy                     1.7.1            py39hc0c34ad_0    conda-forge
send2trash                1.5.0              pyhd3eb1b0_1  
setuptools                52.0.0           py39haa95532_0  
shapely                   1.7.1            py39haadaec5_5    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snuggs                    1.4.7                      py_0    conda-forge
sqlite                    3.36.0               h8ffe710_0    conda-forge
tbb                       2021.3.0             h2d74725_0    conda-forge
terminado                 0.9.4            py39haa95532_0  
testpath                  0.4.4              pyhd3eb1b0_0  
threadpoolctl             2.2.0              pyh8a188c0_0    conda-forge
tiledb                    2.3.4                h78dabda_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
tornado                   6.1              py39h2bbff1b_0  
traitlets                 5.0.5              pyhd3eb1b0_0  
tzdata                    2020f                h52ac0ba_0  
urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
vc                        14.2                 h21ff451_1  
vs2015_runtime            14.27.29016          h5e58377_2  
wcwidth                   0.2.5                      py_0  
webencodings              0.5.1            py39haa95532_1  
wheel                     0.36.2             pyhd3eb1b0_0  
win_inet_pton             1.1.0            py39hcbf5309_2    conda-forge
wincertstore              0.2              py39h2bbff1b_0  
winpty                    0.4.3                         4  
xerces-c                  3.2.3                h0e60522_2    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.3                ha925a31_3  
zipp                      3.4.1              pyhd3eb1b0_0  
zlib                      1.2.11            h62dcd97_1010    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge

Note: you may need to restart the kernel to use updated packages.

##やったこと

pip
echo y | pip uninstall <アンインストールする物>
Conda
conda install -c conda-forge <インストールする物>

##学んだこと
pip と conda は混ぜないこと。
入れる順番によってはコンフリクトを起こしてしまう事。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?