简体   繁体   English

Pip2PI使用Python 3软件包,即使在Python 2 virtualenv中也是如此?

[英]Pip2PI uses Python 3 packages, even in a Python 2 virtualenv?

I am trying to use pip2tgz to build a pipPI compatible package for installation on a non-connected machine. 我正在尝试使用pip2tgz构建与pipPI兼容的软件包,以便在未连接的计算机上进行安装。 I am working from a python 2.7. 我正在使用python 2.7。 virtual env and have verified that pip2tgz is running from it. 虚拟环境,并已验证pip2tgz正在运行。 When I attempt to add, eg, south the package, pip2tgz downloads the file South-0.8.4-py2.py3-none-any.whl. 当我尝试添加(例如,向南)软件包时,pip2tgz下载了文件South-0.8.4-py2.py3-none-any.whl。 dir2pi does not index that file and, on the target machine, when I attempt to install south, I get the error message: dir2pi不会对该文件建立索引,并且在目标计算机上,当我尝试向南安装时,出现错误消息:

OSError: [Errno 2] No such file or directory: '/data/www/pkgs/simple/south/'

Is it possible that pip2tgz is not respecting its python version, when it downloads packages? pip2tgz在下载软件包时是否可能不遵守其python版本? Can I force it to stick to the tgz format? 我可以强迫它坚持使用tgz格式吗?

I had the same issue. 我遇到过同样的问题。 After upgrading pip2pi to version 0.6.2 ( python wheel fixes ), my local repository worked. 将pip2pi升级到0.6.2版(python wheel fixes)后,我的本地存储库工作了。

so try: 所以尝试:

pip install --upgrade pip2pi

... and recreate you local repository. ...并重新创建本地存储库。

Try to locate the package on http://pypi.python.org and copy the link of the tgz file and run 尝试在http://pypi.python.org上找到该软件包,然后复制tgz文件的链接并运行

pip2tgz PATH/TO/DIR URL/TO/TGZ

and remove the md5sum (everything behind the #). 并删除md5sum(#号后面的所有内容)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jupyter Notebook的virtualenvwrapper安装使用virtualenv python但全局pip和软件包 - virtualenvwrapper install of Jupyter Notebook uses virtualenv python but global pip & packages pip on virtualenv并没有在正确的python环境中安装软件包 - pip on virtualenv is not installing packages in the right python environment 未使用 pip 在 vi​​rtualenv 中安装 Python 包 - Python packages not installing in virtualenv using pip 当使用python2.7创建一个干净的virtualenv时,为什么pip使用全局包? - Why pip uses global packages when created a clean virtualenv using python2.7? 为什么要在我当前的virtualenv之外安装python包呢? - Why would pip install python packages outside of my current virtualenv? Python virtualenv --system-site-packages - 意外的pip行为 - Python virtualenv --system-site-packages — unexpected pip behavior 使用 pip 从本地文件系统文件夹安装 Python 包到 virtualenv - Installing Python packages from local file system folder to virtualenv with pip Virtualenv 使用了错误的 python,即使它在 $PATH 中是第一个 - Virtualenv uses wrong python, even though it is first in $PATH 在使用 virtualenv 的项目中无法识别 Pip 和 Python - Pip and Python not recognized in project with virtualenv 在Virtualenv中使用Python的Pip - Using Python's Pip in Virtualenv
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM