报错:


C:\Users\jingsheng.liu>pip install Share
Collecting ShareUsing cached share-1.0.4.tar.gz (5.9 kB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: ShareBuilding wheel for Share (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py bdist_wheel did not run successfully.│ exit code: 1╰─> [60 lines of output]running bdist_wheelrunning buildrunning build_pycreating buildcreating build\libcreating build\lib\sharecopying share\config.py -> build\lib\sharecopying share\data.py -> build\lib\sharecopying share\server.py -> build\lib\sharecopying share\sock.py -> build\lib\sharecopying share\tran_server.py -> build\lib\sharecopying share\__init__.py -> build\lib\sharerunning build_scriptscreating build\scripts-3.8copying and adjusting bin\share -> build\scripts-3.8installing to build\bdist.win-amd64\wheelrunning installrunning install_libcreating build\bdist.win-amd64creating build\bdist.win-amd64\wheelcreating build\bdist.win-amd64\wheel\sharecopying build\lib\share\config.py -> build\bdist.win-amd64\wheel\.\sharecopying build\lib\share\data.py -> build\bdist.win-amd64\wheel\.\sharecopying build\lib\share\server.py -> build\bdist.win-amd64\wheel\.\sharecopying build\lib\share\sock.py -> build\bdist.win-amd64\wheel\.\sharecopying build\lib\share\tran_server.py -> build\bdist.win-amd64\wheel\.\sharecopying build\lib\share\__init__.py -> build\bdist.win-amd64\wheel\.\sharerunning install_datacreating build\bdist.win-amd64\wheel\share-1.0.4.datacreating build\bdist.win-amd64\wheel\share-1.0.4.data\dataTraceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\jingsheng.liu\AppData\Local\Temp\pip-install-dizvi0q1\share_3bec5e901da746d894346812606cc50e\setup.py", line 11, in <module>setup(File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setupdist.run_commands()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commandsself.run_command(cmd)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_commandcmd_obj.run()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\site-packages\wheel\bdist_wheel.py", line 335, in runself.run_command('install')File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_commandself.distribution.run_command(command)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_commandcmd_obj.run()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\install.py", line 61, in runreturn orig.install.run(self)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\command\install.py", line 557, in runself.run_command(cmd_name)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_commandself.distribution.run_command(command)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_commandcmd_obj.run()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\command\install_data.py", line 56, in rundir = convert_path(f[0])File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\util.py", line 122, in convert_pathraise ValueError("path '%s' cannot be absolute" % pathname)ValueError: path '/etc' cannot be absolute[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for ShareRunning setup.py clean for Share
Failed to build Share
Installing collected packages: ShareRunning setup.py install for Share ... errorerror: subprocess-exited-with-error× Running setup.py install for Share did not run successfully.│ exit code: 1╰─> [47 lines of output]running installrunning buildrunning build_pycreating buildcreating build\libcreating build\lib\sharecopying share\config.py -> build\lib\sharecopying share\data.py -> build\lib\sharecopying share\server.py -> build\lib\sharecopying share\sock.py -> build\lib\sharecopying share\tran_server.py -> build\lib\sharecopying share\__init__.py -> build\lib\sharerunning build_scriptscreating build\scripts-3.8copying and adjusting bin\share -> build\scripts-3.8running install_libbyte-compiling c:\users\jingsheng.liu\appdata\local\programs\python\python38\Lib\site-packages\share\server.py to server.cpython-38.pycFile "c:\users\jingsheng.liu\appdata\local\programs\python\python38\Lib\site-packages\share\server.py", line 187except Fault, f:^SyntaxError: invalid syntaxrunning install_dataTraceback (most recent call last):File "<string>", line 2, in <module>File "<pip-setuptools-caller>", line 34, in <module>File "C:\Users\jingsheng.liu\AppData\Local\Temp\pip-install-dizvi0q1\share_3bec5e901da746d894346812606cc50e\setup.py", line 11, in <module>setup(File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setupdist.run_commands()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commandsself.run_command(cmd)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_commandcmd_obj.run()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\site-packages\setuptools\command\install.py", line 61, in runreturn orig.install.run(self)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\command\install.py", line 557, in runself.run_command(cmd_name)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_commandself.distribution.run_command(command)File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_commandcmd_obj.run()File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\command\install_data.py", line 56, in rundir = convert_path(f[0])File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\util.py", line 122, in convert_pathraise ValueError("path '%s' cannot be absolute" % pathname)ValueError: path '/etc' cannot be absolute[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure× Encountered error while trying to install package.
╰─> Sharenote: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

分析:

无法处理/etc

File "c:\users\jingsheng.liu\appdata\local\programs\python\python38\lib\distutils\util.py", line 122, in convert_pathraise ValueError("path '%s' cannot be absolute" % pathname)ValueError: path '/etc' cannot be absolute

解决:

打开util.py

    if os.sep == '/':return pathnameif not pathname:return pathname'''根据报错增加的代码段'''if pathname.startswith('/etc'):paths = pathname.split('/')return '\\etc\\' + paths[-1]
'''根据报错增加的代码段'''if pathname[0] == '/':raise ValueError("path '%s' cannot be absolute" % pathname)if pathname[-1] == '/':raise ValueError("path '%s' cannot end with '/'" % pathname)

修改后重新安装:安装成功

 C:\Users\jingsheng.liu>pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ share==1.0.4
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting share==1.0.4Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f5/fb/07e73d2551046cb23a37cd423c490bdcc5151f6cf79b8fdf5e3f6df318dd/share-1.0.4.tar.gz (5.9 kB)Preparing metadata (setup.py) ... done
Building wheels for collected packages: shareBuilding wheel for share (setup.py) ... doneCreated wheel for share: filename=share-1.0.4-py3-none-any.whl size=8989 sha256=fac7bc4626cce9859bfee784ffb6b960167b1cef0a15c54147a3382c02fa1728Stored in directory: c:\users\jingsheng.liu\appdata\local\pip\cache\wheels\e8\18\2f\394482d27600a54bda5e1848ec9eecbd553052c75663d8191b
Successfully built share
Installing collected packages: share
Successfully installed share-1.0.4

Python-share package安装问题解决方案相关推荐

  1. python有哪些常用的package_个人Python常用Package及其安装

    为了避免每次重装系统时又要东翻西找,现在此记录一下目前常用的Python包安装过程. 1) Python: 2.7.11, 下载地址:www.python.org.由于个人喜欢使用PyQt4(其实是不 ...

  2. python使用pip安装第三方库(工具包)速度慢、超时、失败的解决方案

    python使用pip安装第三方库(工具包)速度慢.超时.失败的解决方案 参考文章: (1)python使用pip安装第三方库(工具包)速度慢.超时.失败的解决方案 (2)https://www.cn ...

  3. python权限不够无法写入_解决python使用pip安装模块的权限问题

    ubuntu16.04下默认的python和pip 1.ubuntu16.04默认安装了两个版本的python,python2.7和python3.5,可以使用python -V查看版本 命令行中py ...

  4. python用pip安装numpy错误_在Ubuntu上用pip安装NumPy失败了

    当我尝试: $sudo pip install numpy 在我的Ubuntu 12.04服务器上,我得到: --------------------------------------------- ...

  5. pip安装了 但是python找不到_解决python明明pip安装成功却找不到包的问题

    解决python明明pip安装成功却找不到包的问题 如下所示: 原因1:版本不对,如用环境变量设置的python3.7路径,那么用的就是3.7的pip.exe安装了包.却用的是2.7的python运行 ...

  6. Python环境的安装(Anaconda+Jupyter notebook+Pycharm)

    点击上方"小白学视觉",选择加"星标"或"置顶" 重磅干货,第一时间送达 本文总结了Windows下Python环境的安装,包括Anacon ...

  7. VRPM包安装失败解决方案:had non-zero exit status

    VRPM包安装失败解决方案:had non-zero exit status 目录 VRPM包安装失败解决方案:had non-zero exit status #VRPM包安装 #找到VRPM包的文 ...

  8. windows 10 anaconda python 3.7 安装keras-gpu tensorflow-gpu

    我的个人博客:zhang0peter的个人博客 win 10 anaconda python3.7 安装keras tensorflow-gpu pytorch的安装参考这篇文章:windows an ...

  9. Windows上python开发--2安装django框架

    Windows上python开发--2安装django框架 分类: 服务器后台开发2014-05-17 21:22 2310人阅读 评论(2) 收藏 举报 python django 上一篇文章中讲了 ...

最新文章

  1. 支付宝支付 第六集:生成支付二维码
  2. 思科2950配置端口镜像
  3. Keeplived配置Nginx双机高可用【转】
  4. java 招聘需求_Java人员要具备哪些技能 招聘需求包括什么
  5. 5.15 vs2019 静态编译_HPCC S01E01 编译 win10,ubuntu 安装
  6. 如何利用秒级监控进行mongodb故障排查
  7. QQ小工具网页版源码
  8. 荣耀Magic4核心配置曝光:最强驯龙高手 性能远超iPhone 13 Pro
  9. SpringCloud和AlibabaCloud区别
  10. 来客推电商快报之教育产业的未来发展
  11. ORACLE新增字段、注释等
  12. XCode7报 App Transport Security has blocked a cleartext HTTP (http://) resource load since it is inse
  13. vhdl timing requirements not met 错误 quartusII中
  14. LVS负载均衡群集合集
  15. WiFi的2.4G、5G、6G频段
  16. 护眼灯有用吗?双十二买什么样的护眼灯真的有效果
  17. Calendar判断指定时间是周几、上下午、月份的简单运用
  18. 软件测试怎么做?靠谱第三方软件测评公司有哪些?
  19. AO3415-ASEMI低压P沟道MOS管AO3415
  20. windows如何删除默认打开方式

热门文章

  1. Pancake Sorting问题研究与优化
  2. TS+React+Bmap drawingManager setDrawingMode
  3. 写程序学ML:Logistic回归算法原理及实现(二)
  4. 杰理之判断是苹果还是安卓手机【篇】
  5. 台式机如何调节自己电脑亮度
  6. Nginx禁止访问某个目录或某个后缀文件
  7. 学习笔记(01):PPT2013 设计应该这样玩-PPT中伪立体的图形绘制(案例篇)
  8. 什么是电子计算机网络,计算机网络技术是什么
  9. Win11下解决VS下载0kb/s的问题
  10. 小米VR一体机游戏开发日记(第三天)