python-wheel

Why can't `virtualenv` find `pkg_resources`?

北战南征 提交于 2019-12-03 13:14:30
I'm trying to use virtualenv in Ubuntu to install a local virtual Python environment. When I run the shell command: $ virtualenv ./virt_python It throws an exception that it can't import pkg_resources . But when I open a Python shell and from pkg_resources import load_entry_point it runs fine. For reference, the complete stacktrace is below. $ virtualenv ./virt_python New python executable in ./virt_python/bin/python Installing setuptools............done. Installing pip....... Complete output from command /home/rpsharp/local/...hon/bin/easy_install /usr/local/lib/pytho...pport/pip-1.1.tar.gz:

How pip recognize to create wheel for a package

℡╲_俬逩灬. 提交于 2019-12-02 08:26:37
问题 How pip decide to run setup.py bdist_wheel againest legacy setup.py install on a package? 回答1: I think it is described somewhere! but I dont know exacly where. maybe in one PEP. The main check of whether to create a wheel or not is in https://github.com/pypa/pip/blob/develop/pip/wheel.py#L773 the pip.index.egg_info_matches checks basename of your package with r'([a-z0-9_.]+)-([a-z0-9_.!+-]+)' . That means setup.py containing folder name must be in form of mypackage-anything in first place!

Error importing sklearn

给你一囗甜甜゛ 提交于 2019-12-01 15:01:24
Python version : 3.5.2 I getting started with machine learning and things... So I installed sklearn and some other packages form pip. All of them were able to be installed successfully except sklearn so, I downloaded the wheel and installed it from here . It was successfully installed but when i tried to import it in the order to check correct installation, I got tons of error : Traceback (most recent call last): File "C:\MyFiles\Programs\Python\PlayGround.py", line 1, in import sklearn File "C:\Users\Vaibhav Acharya\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn__init__.py",

Docker: no such option: --use-wheel

会有一股神秘感。 提交于 2019-12-01 11:27:33
I'm trying to use Docker to create a dependency package for AWS Lambda using this repository, but whenever I try to run the build.sh file, I end up with the message: no such option: --use-wheel Then when I try to use pip install wheel (outside of Docker), I'm told that it's already on my local machine, which it is. How do I install Wheel in the Docker container? If it's helpful, this appears to be the line of code in build.sh that is giving the issue: test -f /outputs/requirements.txt && pip install --use-wheel -r /outputs/requirements.txt Any help is much appreciated! Your issue isn't due to

Docker: no such option: --use-wheel

≡放荡痞女 提交于 2019-12-01 07:36:33
问题 I'm trying to use Docker to create a dependency package for AWS Lambda using this repository, but whenever I try to run the build.sh file, I end up with the message: no such option: --use-wheel Then when I try to use pip install wheel (outside of Docker), I'm told that it's already on my local machine, which it is. How do I install Wheel in the Docker container? If it's helpful, this appears to be the line of code in build.sh that is giving the issue: test -f /outputs/requirements.txt && pip

module 'pip' has no attribute 'pep425tags'

半腔热情 提交于 2019-12-01 05:54:56
When I am trying to install .whl with pip it said: is not a supported wheel on this platform to solve this problem, I searched the Internet and it said I can input this into shell import pip; print(pip.pep425tags.get_supported()) with this I can get the documents and versions that pip supports However, when I input these code, it said: module 'pip' has no attribute 'pep425tags' What's wrong? For pip v10 use this: import pip._internal; print(pip._internal.pep425tags.get_supported()) Paul Harmon This worked for me with Python 2.7 (in a virtualenv using that version): import wheel.pep425tags

What is the meaning of 'cp3xm' and 'cp2xm' in the name of Python wheels?

ε祈祈猫儿з 提交于 2019-12-01 05:15:26
问题 To my knowledge, the naming rules of python wheel is package_version-related_python_version-none-32bits_or_64bits.whl For example, numpy‑1.11.2+mkl‑cp35‑none‑win_amd64.whl is numpy of version 1.11.2 for Python3.5 running in windows 64 bits platform. Reference Currently i have noticed the naming of Python packages in Unofficial Windows Binaries for Python Extension Packages use 'cpxxm' to replace 'none'. For example, numpy‑1.11.2+mkl‑cp35‑cp35m‑win_amd64.whl When installing these packages, pip

How to create a Pure-Python wheel

筅森魡賤 提交于 2019-12-01 04:10:23
From the following setup.py file, I am trying to create a pure-python wheel from a project that should contain only python 2.7 code. from setuptools import setup setup( name='foo', version='0.0.1', description='', url='', install_requires=[ 'bpython', 'Django==1.8.2', ], ) However, when I run python setup.py bdist_wheel the wheel file that is generated is platform specific foo-0.0.1-cp27-none-macosx_10_9_x86_64.whl wheel file instead of the expected foo-0.0.1-cp27-none-any.whl . When I try to install this wheel on a different platform it fails saying it is not compatible with this Python . I

'pip setup.py bdist_wheel' no longer builds forced non-pure wheels

本秂侑毒 提交于 2019-12-01 03:59:44
I have a project that compiles with C extensions on Linux, but without them on Windows. When I first generated the wheel files on Windows with python setup.py bdist_wheel , they became universal, and I could not upload them to PyPI as these universal wheels are preferred by pip for installation over the .tar.gz uploads (the result from python setup.py sdist ). The trick around this was to specify in the setup.py : Distribution.is_pure = lambda *args: False or by subclassing Distribution : class BinaryDistribution(Distribution): def is_pure(self): return False and calling setup() in setup.py

Wheel files : What is the meaning of “none-any” in protobuf-3.4.0-py2.py3-none-any.whl

依然范特西╮ 提交于 2019-11-30 18:51:04
I used pip to get .whl file for numpy pip wheel --wheel-dir=./ numpy and I have got numpy-1.13.3-cp27-cp27mu-linux_armv7l.whl because I am using ARM platform, but when run pip for protobuf pip wheel --wheel-dir=./ protobuf I got protobuf-3.4.0-py2.py3-none-any.whl So, why isn't linux_armv7l like the case of numpy, I didn't alter the machine and searched for that difference but no information. thanks for advice . Let's split package names by components: numpy — package name 1.13.3 — package version cp27 — the package was compiled to be used with this version of Python cp27mu — compilation flags