我尝试用这个命令升级pip3:
sudo pip3 install --upgrade pip
但不幸的是它不再起作用并显示此消息:
pip3 - 版本
信息:
回溯(最近通话最后一个):
文件"/usr/local/lib/python3.4/dist-packages/pkg_resources/ 初始化的.py",线路651,在_build_master ws.require(需要)
文件"在/ usr /本地/ lib/python3.4/dist-packages/pkg_resources/init .py",第952行,在require needed = self.resolve(parse_requirements(requirements))
File"/usr/local/lib/python3.4/dist-packages/ pkg_resources/init .py",第844行,在解析时引发VersionConflict(dist,req).with_context(dependent_req)pkg_resources.VersionConflict :( pip 7.1.2(/usr/local/lib/python3.4/dist-packages), Requirement.parse( 'PIP == 1.5.6'))在处理上述异常期间,发生了另一个异常:
回溯(最后最近一次调用):
文件"在/ usr/local/bin目录/ PIP 3",5号线,从pkg_resources才能导入load_entry_point
文件"/usr/local/lib/python3.4/dist-packages/pkg_resources/ 初始化的.py "线3084,在@_call_aside
文件"/usr/local/lib/python3.4/dist-packages/pkg_resources/ INIT py"为,线3070,在_call_aside F(*指定参数时,**kwargs)
文件"/ USR /local/lib/python3.4/dist-packages/pkg_resources/ INIT py "为,线3097,在_initialize_master_working_set working_set = WorkingSet._build_master()
文件" /usr/local/lib/python3.4/dist-packages/pkg_resources/init .py",第653行,在_build_master中返回cls._build_from_requirements( 需要)
文件"/usr/local/lib/python3.4/dist-packages/pkg_resources/ INIT py"为,线666,在_build_from_requirements dists中= ws.resolve(请求数,环境())
文件"的/ usr /本地/ lib中/python3.4/dist-packages/pkg_resources/ 初始化的.py",线路839,在解决提高DistributionNotFound(REQ,requirers)pkg_resources.DistributionNotFound:在'点子== 1.5.6’分配没有被发现并被要求应用
怎么解决?
我有一个ssh-key fingerprint:
16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Run Code Online (Sandbox Code Playgroud)
我想看看这个指纹的 randomart 图像。是否有一个命令将此指纹作为输入并输出 randomart 图像?
PS:我不是要求-o VisualHostKeySSH 命令附带的选项。
我正在尝试阅读 Movie Lens 数据集:http://files.grouplens.org/datasets/movielens/ml-100k/。
我正在使用 Python 3.4 版,并且正在遵循此处给出的教程“ http://www.gregreda.com/2013/10/26/using-pandas-on-the-movielens-dataset/ ”。
当我尝试使用那里提到的代码读取 u.item 数据时:
# the movies file contains columns indicating the movie's genres
# let's only load the first five columns of the file with usecols
m_cols = ['movie_id', 'title', 'release_date', 'video_release_date', 'imdb_url']
movies = pd.read_csv('ml-100k/u.item', sep='|', names=m_cols, usecols=range(5), encoding='UTF-8')
Run Code Online (Sandbox Code Playgroud)
我收到以下错误“UnicodeDecodeError:‘utf-8’编解码器无法解码位置 3 中的字节 0xe9:无效的连续字节”。
此错误的可能原因是什么以及解决方案是什么
我尝试将encoding='utf-8'添加到pd.read_csv(encoding='utf-8'),但不幸的是它没有解决任何问题。
错误回溯是:
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-4-4cc01a7faf02> in <module>()
9 # let's only load the first five columns of the …Run Code Online (Sandbox Code Playgroud) csv ×1
fingerprint ×1
pandas ×1
pip ×1
python ×1
python-3.4 ×1
python-3.x ×1
ssh-keys ×1
ubuntu-14.04 ×1