I can't figure out why when I run pip install ../path_to_my_proj/ (from a virtualenv) none of the data files are copied across to the sitepackage/myproj/ folder. The python packages are copied across correctly.
python version 3.4.4
My project directory is like this:
├── myproj
│ ├── __init__.py
│ ├── module1.py
│ └── module2.py
├── data_files
| ├── subfolder1
│ | ├── datafile.dll
│ | └── datafile2.dll
| └── subfolder2
│ ├── datafile3.dll
│ └── datafile4.dll
|
├── MANIFEST.in
└── setup.py
And my MANIFEST.in looks like
recursive-include data_files *
include README.md
my setup looks like:
setup(
name='myproj',
version='0.1.1',
install_requires=['requirement'],
packages=['myproj'],
include_package_data=True,
)
The pip install <package> command always looks for the latest version of the package and installs it. It also searches for dependencies listed in the package metadata and installs them to ensure that the package has all the requirements that it needs.
The pip command has options for installing, upgrading and deleting packages, and can be run from the Windows command line. By default, pip installs packages located in the Python Package Index (PyPI), but can also install from other indexes.
A “pip: command not found” error occurs when you fail to properly install the package installer for Python (pip) needed to run Python on your computer. To fix it, you will either need to re-install Python and check the box to add Python to your PATH or install pip on your command line.
If you want to list all the Python packages installed in an environment, pip list command is what you are looking for. The command will return all the packages installed, along with their specific version and location.
I encountered the same problem and asked about it on https://gitter.im/pypa/setuptools. The result? You just can't do that. data_files
must live under myproj
.
You can fake it by putting an empty __init__.py
in data_files
, but then it will get put into PYTHONHOME\Lib\site-packages
along side myproj
at same level, polluting the name space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With