Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装python包jieba3k会更改已安装包jieba的版本_Python_Pip_Dependencies - Fatal编程技术网

安装python包jieba3k会更改已安装包jieba的版本

安装python包jieba3k会更改已安装包jieba的版本,python,pip,dependencies,Python,Pip,Dependencies,以下是如何重现我的问题: 创建新的virtualenv: $ virtualenv testenv --python=/usr/bin/python3.6 Running virtualenv with interpreter /usr/bin/python3.6 Using base prefix '/usr' New python executable in testenv/bin/python3.6 Also creating executable in testenv/bin/pyth

以下是如何重现我的问题:

创建新的virtualenv:

$ virtualenv testenv --python=/usr/bin/python3.6 
Running virtualenv with interpreter /usr/bin/python3.6
Using base prefix '/usr'
New python executable in testenv/bin/python3.6
Also creating executable in testenv/bin/python
Installing setuptools, pip, wheel...done.
$ source testenv/bin/activate
(testenv) $ cd test
安装jieba并检查
\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

(testenv) test$ pip3 install jieba
Collecting jieba
Installing collected packages: jieba
Successfully installed jieba-0.39
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.39'
>>> Quit (core dumped)
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.34'
>>> Quit (core dumped)
好的,0.39版

安装jieba3k:

(testenv) test$ pip3 install jieba3k
Collecting jieba3k
Installing collected packages: jieba3k
Successfully installed jieba3k-0.35.1
重新检查洁霸
\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

(testenv) test$ pip3 install jieba
Collecting jieba
Installing collected packages: jieba
Successfully installed jieba-0.39
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.39'
>>> Quit (core dumped)
(testenv) test$ python
Python 3.6.5 (default, Mar 29 2018, 03:28:50) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import jieba
>>> jieba.__version__
'0.34'
>>> Quit (core dumped)
新版本是0.34


为什么会这样?我如何避免这种情况呢?

jieba
jieba3k
不是两个不同的包,它们是同一个包的两个不同版本,而
jieba
是更新的。安装
jieba3k
时,它会用旧版本覆盖包
jieba

简而言之:忘记
jieba3k
,只使用
jieba