关于Python的Mylibrary库
怎么安装。。。这个库?刚进入门python的学生 是不是大小写搞错了? liuzhengyuan 发表于 2020-4-29 12:08
是不是大小写搞错了?
import sys, time, random, math, pygame,locale
from pygame.locals import *
from MyLibrary import * 在cmd里运行:pip install MyLibrary pip3 install MyLibrary
求最佳 Mike_Python0721 发表于 2020-4-29 14:37
pip3 install MyLibrary
求最佳
在cmd? KevinHu 发表于 2020-4-29 13:07
在cmd里运行:pip install MyLibrary
C:\Users\Administrator>pip install MyLibrary
Collecting MyLibrary
Using cached mylibrary-0.0.6.zip (1.9 kB)
ERROR: Command errored out with exit status 1:
command: 'd:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-5b5n8l_w\\MyLibrary\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-5b5n8l_w\\MyLibrary\\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 'C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info'
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\
Complete output (8 lines):
Warning: 'keywords' should be a list, got type 'tuple'
running egg_info
creating C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info\mylibrary.egg-info
writing C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info\mylibrary.egg-info\PKG-INFO
writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info\mylibrary.egg-info\dependency_links.txt
writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info\mylibrary.egg-info\top_level.txt
writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-install-5b5n8l_w\MyLibrary\pip-egg-info\mylibrary.egg-info\SOURCES.txt'
error: package directory 'src' does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 18925471037 发表于 2020-4-29 15:28
C:%users\Administrator>pip install MyLibrary
Collecting MyLibrary
Using cached mylibrary-0.0.6 ...
那我不知道了 本帖最后由 xiaosi4081 于 2020-4-29 17:46 编辑
18925471037 发表于 2020-4-29 15:28
C:%users\Administrator>pip install MyLibrary
Collecting MyLibrary
Using cached mylibrary-0.0.6 ...
要以管理员身份运行cmd
求最佳
xiaosi4081 发表于 2020-4-29 17:17
要以管理员身份运行cmd
求最佳
一样不行,报错 18925471037 发表于 2020-4-29 17:48
一样不行,报错
截图过来看看 直接去官网下载:
https://pypi.org/project/mylibrary/ xiaosi4081 发表于 2020-4-29 18:03
截图过来看看
上图 https://blog.csdn.net/weixin_44517500/article/details/99683286 18925471037 发表于 2020-4-29 18:11
上图
直接去pypl下载吧 xiaosi4081 发表于 2020-4-29 18:14
直接去pypl下载吧
具体怎么做可以说说吗?刚入门的小白 18925471037 发表于 2020-4-29 18:17
具体怎么做可以说说吗?刚入门的小白
我的回复在审核 等你 有一种可能,如果是你下载的代码,看下这个Mylibrary是不是别人写的Mylibrary.py文件,如果是的话,貌似要打开这一层的文件夹(在pycharm中是这样)才能运行这个代码 这个库好像在2016年就停更了,我刚才试了下,也是一模一样的报错,估计是有问题的。
页:
[1]