第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

在 Linux Ubuntu 18.04 上從 pip 安裝 cartopy 退出并出現(xiàn)各種錯(cuò)誤

在 Linux Ubuntu 18.04 上從 pip 安裝 cartopy 退出并出現(xiàn)各種錯(cuò)誤

猛跑小豬 2023-04-25 15:20:40
shell 命令pip install cartopy導(dǎo)致了幾個(gè)錯(cuò)誤。起初,出現(xiàn)以下錯(cuò)誤:    ERROR: Command errored out with exit status 1:     command: /home/linuxbrew/.linuxbrew/opt/python@3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j47_isf2/cartopy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j47_isf2/cartopy/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 /tmp/pip-pip-egg-info-a9f6gipd         cwd: /tmp/pip-install-j47_isf2/cartopy/    Complete output (3 lines):    /tmp/pip-install-j47_isf2/cartopy/setup.py:157: UserWarning: Unable to determine Proj version. Ensure you have 4.9.0 or later installed, or installation may fail.      warnings.warn(    Proj version 0.0.0 is installed, but cartopy requires at least version 4.9.0.    ----------------------------------------ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.重新安裝 proj4 并嘗試在我的.bashrc文件中傳遞環(huán)境變量后,例如export PROJ_LIB=/home/linuxbrew/.linuxbrew/bin/projexport PROJ=/home/linuxbrew/.linuxbrew/bin/proj
查看完整描述

1 回答

?
HUX布斯

TA貢獻(xiàn)1876條經(jīng)驗(yàn) 獲得超6個(gè)贊

在搜索主要錯(cuò)誤消息的解決方案之后c++: error: unrecognized command line option '-R'

我所做的是使用強(qiáng)大的方法搜索相關(guān)文件find

andylu@andylu-ThinkPad-Edge-E130:~/Desktop/Python/Scripts$ sudo find / -type f -iname "unixccompiler.py"

find: ‘/run/user/1000/gvfs’: Permission denied

find: ‘/tmp/.mount_pcloudgeFVGR’: Permission denied

/snap/core/9436/usr/lib/python3.5/distutils/unixccompiler.py

/snap/core/9665/usr/lib/python3.5/distutils/unixccompiler.py

/snap/gimp/281/usr/lib/python2.7/distutils/unixccompiler.py

/snap/gimp/273/usr/lib/python2.7/distutils/unixccompiler.py

/snap/core18/1880/usr/lib/python3.6/distutils/unixccompiler.py

/snap/core18/1880/usr/lib/python3.7/distutils/unixccompiler.py

/snap/core18/1880/usr/lib/python3.8/distutils/unixccompiler.py

/snap/core18/1754/usr/lib/python3.6/distutils/unixccompiler.py

/snap/core18/1754/usr/lib/python3.7/distutils/unixccompiler.py

/snap/core18/1754/usr/lib/python3.8/distutils/unixccompiler.py

/usr/lib/python3.8/distutils/unixccompiler.py

/usr/lib/python3.6/distutils/unixccompiler.py

/usr/lib/python3/dist-packages/numpy/distutils/unixccompiler.py

/usr/lib/python3.7/distutils/unixccompiler.py

/usr/lib/python2.7/distutils/unixccompiler.py

/usr/lib/python2.7/dist-packages/numpy/distutils/unixccompiler.py

find: ‘/home/andylu/pCloudDrive’: Permission denied

/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.5/libexec/setuptools/build/lib/setuptools/_distutils/unixccompiler.py

/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.5/libexec/setuptools/setuptools/_distutils/unixccompiler.py

/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.5/lib/python3.8/distutils/unixccompiler.py

/home/linuxbrew/.linuxbrew/Cellar/numpy/1.19.1/lib/python3.8/site-packages/numpy/distutils/unixccompiler.py

/home/linuxbrew/.linuxbrew/lib/python3.8/site-packages/numpy/distutils/unixccompiler.py

/home/linuxbrew/.linuxbrew/lib/python3.8/site-packages/setuptools/_distutils/unixccompiler.py

version 3.8接下來,我打開了包含當(dāng)前在我的文本編輯器中使用的相關(guān) python 文件VS Code。然后,我在這些文件中搜索“-R”以找到以下代碼片段:


? ? ? ? else:

? ? ? ? ? ? if self._is_gcc(compiler):

? ? ? ? ? ? ? ? # gcc on non-GNU systems does not need -Wl, but can

? ? ? ? ? ? ? ? # use it anyway.? Since distutils has always passed in

? ? ? ? ? ? ? ? # -Wl whenever gcc was used in the past it is probably

? ? ? ? ? ? ? ? # safest to keep doing so.

? ? ? ? ? ? ? ? if sysconfig.get_config_var("GNULD") == "yes":

? ? ? ? ? ? ? ? ? ? # GNU ld needs an extra option to get a RUNPATH

? ? ? ? ? ? ? ? ? ? # instead of just an RPATH.

? ? ? ? ? ? ? ? ? ? return "-Wl,--enable-new-dtags,-R" + dir

? ? ? ? ? ? ? ? else:

? ? ? ? ? ? ? ? ? ? return "-Wl,-R" + dir

? ? ? ? ? ? else:

? ? ? ? ? ? ? ? # No idea how --enable-new-dtags would be passed on to

? ? ? ? ? ? ? ? # ld if this system was using GNU ld.? Don't know if a

? ? ? ? ? ? ? ? # system like this even exists.

? ? ? ? ? ? ? ? return "-R" + dir

在這個(gè)代碼片段中,我用"-R"和"-rpath="最后一個(gè)獨(dú)立的"-R"(上面代碼片段的最后一行)甚至用'-Wl,-rpath='. 完成后,代碼片段如下所示:


? ? else:

? ? ? ? if self._is_gcc(compiler):

? ? ? ? ? ? # gcc on non-GNU systems does not need -Wl, but can

? ? ? ? ? ? # use it anyway.? Since distutils has always passed in

? ? ? ? ? ? # -Wl whenever gcc was used in the past it is probably

? ? ? ? ? ? # safest to keep doing so.

? ? ? ? ? ? if sysconfig.get_config_var("GNULD") == "yes":

? ? ? ? ? ? ? ? # GNU ld needs an extra option to get a RUNPATH

? ? ? ? ? ? ? ? # instead of just an RPATH.

? ? ? ? ? ? ? ? return "-Wl,--enable-new-dtags,-rpath=" + dir

? ? ? ? ? ? else:

? ? ? ? ? ? ? ? return "-Wl,-rpath=" + dir

? ? ? ? else:

? ? ? ? ? ? # No idea how --enable-new-dtags would be passed on to

? ? ? ? ? ? # ld if this system was using GNU ld.? Don't know if a

? ? ? ? ? ? # system like this even exists.

? ? ? ? ? ? return "-Wl,-rpath=" + dir

保存并關(guān)閉上述修改后的python-scripts后,cartopy的安裝終于成功了:


andylu@andylu-ThinkPad-Edge-E130:~/Desktop/Python/Scripts$ pip install cartopy

Collecting cartopy

? Using cached Cartopy-0.18.0.tar.gz (14.4 MB)

Requirement already satisfied: numpy>=1.10 in /home/linuxbrew/.linuxbrew/lib/python3.8/site-packages (from cartopy) (1.19.1)

Requirement already satisfied: shapely>=1.5.6 in /home/linuxbrew/.linuxbrew/lib/python3.8/site-packages (from cartopy) (1.7.0)

Requirement already satisfied: pyshp>=1.1.4 in /home/linuxbrew/.linuxbrew/lib/python3.8/site-packages (from cartopy) (2.1.0)

Requirement already satisfied: six>=1.3.0 in /home/linuxbrew/.linuxbrew/lib/python3.8/site-packages (from cartopy) (1.15.0)

Requirement already satisfied: setuptools>=0.7.2 in /home/linuxbrew/.linuxbrew/lib/python3.8/site-packages (from cartopy) (49.2.1)

Building wheels for collected packages: cartopy

? Building wheel for cartopy (setup.py) ... done

? Created wheel for cartopy: filename=Cartopy-0.18.0-cp38-cp38-linux_x86_64.whl size=15743039 sha256=b95932012d877432db8e629bdc77e730227f93f94515a54e59e4c6fb6a85bdad

? Stored in directory: /home/andylu/.cache/pip/wheels/7c/3c/68/ed800c08e3e6579b632fdd26becee97c5c5474625f6c97eca6

Successfully built cartopy

Installing collected packages: cartopy

Successfully installed cartopy-0.18.0


查看完整回答
反對(duì) 回復(fù) 2023-04-25
  • 1 回答
  • 0 關(guān)注
  • 273 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)