Python setuptools install is not installing a package - python

I created a fork from this git repo: https://github.com/QQuick/Opy
I added an __init__.py to the opy directory / package. When I run setup.py install, the opy package is not installed into my site-packages directory. Why?
Here's the setup.py script:
import os
import sys
sys.path.append ('opy')
import opy
from setuptools import setup
import codecs
def read (*paths):
with codecs.open (os.path.join (*paths), 'r', encoding = 'utf-8') as aFile:
return aFile.read()
setup (
name = 'Opy',
version = opy.programVersion,
description = 'OPY - Obfuscator for Python, string obfuscation added, keyword added',
long_description = (
read ('README.rst') + '\n\n' +
read ('license_reference.txt')
),
keywords = ['opy', 'obfuscator', 'obfuscation', 'obfuscate', 'kivy', 'pyo', 'python'],
url = 'https://github.com/JdeH/Opy/',
license = 'Apache 2',
author = 'Jacques de Hooge',
author_email = 'jacques.de.hooge#qquick.org',
packages = ['opy'],
include_package_data = True,
install_requires = [],
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: Other/Proprietary License',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
)
Output:
>python setup.py install
running install
running bdist_egg
running egg_info
creating Opy.egg-info
writing Opy.egg-info\PKG-INFO
writing top-level names to Opy.egg-info\top_level.txt
writing dependency_links to Opy.egg-info\dependency_links.txt
writing manifest file 'Opy.egg-info\SOURCES.txt'
reading manifest file 'Opy.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.des' found anywhere in distribution
writing manifest file 'Opy.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\opy
copying opy\opy.py -> build\lib\opy
copying opy\opymaster.py -> build\lib\opy
copying opy\__init__.py -> build\lib\opy
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\opy
copying build\lib\opy\opy.py -> build\bdist.win32\egg\opy
copying build\lib\opy\opymaster.py -> build\bdist.win32\egg\opy
copying build\lib\opy\__init__.py -> build\bdist.win32\egg\opy
byte-compiling build\bdist.win32\egg\opy\opy.py to opy.pyc
byte-compiling build\bdist.win32\egg\opy\opymaster.py to opymaster.pyc
byte-compiling build\bdist.win32\egg\opy\__init__.py to __init__.pyc
creating build\bdist.win32\egg\EGG-INFO
copying Opy.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying Opy.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying Opy.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying Opy.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist\Opy-1.1.28.1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing Opy-1.1.28.1-py2.7.egg
Copying Opy-1.1.28.1-py2.7.egg to c:\python27\lib\site-packages
Adding Opy 1.1.28.1 to easy-install.pth file
Installed c:\python27\lib\site-packages\opy-1.1.28.1-py2.7.egg
Processing dependencies for Opy==1.1.28.1
Finished processing dependencies for Opy==1.1.28.1

To sum up the statements from the comments:
setuptools.setup does its job; however, instead of just copying modules to site-packages (what distutils does), python setup.py install will build an egg file which is then installed by simply copying it to site-packages. This way, it's easy to uninstall the package afterwards by just removing the one egg file.
If you don't like the package being installed in an archive, you can:
do the "old and unmanageable" install:
$ python setup.py install --old-and-unmanageable
but beware that you may not be able to properly uninstall the package when doing that. Still, this command may be used e.g. in a virtual environment that you plan to remove afterwards anyway;
use pip as it's able to install packages from source directories:
$ pip install dir/
where dir is the directory containing the setup.py script. This is the preferred way; pip will build a wheel file first, then install it. The modules will be installed flat (written to disk as files), but pip will also store the list of installed files among other metadata, so all files will be removed properly on package uninstall.

I replaced
from setuptools import setup
with
from distutils.core import setup
and that worked. But, isn't the setuptools module version of that function supposed to install into the site-packages directory? The documentation indicates it does. I don't get it...

Related

Could not find suitable distribution for Requirement.parse('env_mltf.yml')

I try to install a virtual environment from GitHub
first I made a virtual environment with Conda, then I install git in this environment. Next I cloned the project and cd to package package directory contains setup.py.
But when I try to install setup.py (pip install setup.py) I got an error:
Could not find suitable distribution for Requirement.parse('env_mltf.yml')
This is the output of my terminal:
running install
running bdist_egg
running egg_info
writing mltf.egg-info/PKG-INFO
/opt/anaconda3/envs/DL/lib/python3.9/site-packages/setuptools/dist.py:125: UserWarning: newlines not allowed and will break in the future
warnings.warn("newlines not allowed and will break in the future")
writing dependency_links to mltf.egg-info/dependency_links.txt
writing requirements to mltf.egg-info/requires.txt
writing top-level names to mltf.egg-info/top_level.txt
package init file './__init__.py' not found (or not a regular file)
reading manifest file 'mltf.egg-info/SOURCES.txt'
writing manifest file 'mltf.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.9-x86_64/egg
creating build/bdist.macosx-10.9-x86_64/egg/gym_mltf
copying build/lib/gym_mltf/README.md -> build/bdist.macosx-10.9-x86_64/egg/gym_mltf
copying build/lib/gym_mltf/example.py -> build/bdist.macosx-10.9-x86_64/egg/gym_mltf
byte-compiling build/bdist.macosx-10.9-x86_64/egg/gym_mltf/example.py to example.cpython-39.pyc
creating build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying mltf.egg-info/PKG-INFO -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying mltf.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying mltf.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying mltf.egg-info/requires.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
copying mltf.egg-info/top_level.txt -> build/bdist.macosx-10.9-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/mltf-0.0.1-py3.9.egg' and adding 'build/bdist.macosx-10.9-x86_64/egg' to it
removing 'build/bdist.macosx-10.9-x86_64/egg' (and everything under it)
Processing mltf-0.0.1-py3.9.egg
Removing /opt/anaconda3/envs/DL/lib/python3.9/site-packages/mltf-0.0.1-py3.9.egg
Copying mltf-0.0.1-py3.9.egg to /opt/anaconda3/envs/DL/lib/python3.9/site-packages
mltf 0.0.1 is already the active version in easy-install.pth
Installed /opt/anaconda3/envs/DL/lib/python3.9/site-packages/mltf-0.0.1-py3.9.egg
Processing dependencies for mltf==0.0.1
Searching for env_mltf.yml
Reading https://pypi.org/simple/env_mltf.yml/
Reading https://pypi.org/simple/env-mltf.yml/
Couldn't find index page for 'env_mltf.yml' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
No local packages or working download links found for env_mltf.yml
error: Could not find suitable distribution for Requirement.parse('env_mltf.yml')

Why customer python package can not be imported?

I created my own python package named jjnsegutils and upload it to Pypi website. But after I successfully install it by pip install jjnsegutils, I still can not import it. Error shows: ModuleNotFoundError: No module named 'jjnsegutils'.
Details about the whole procedure are as follows.
Package structure and details
The structure of my package is:
jjnsequtils
├─ __init__.py
├─ myutil
├─ __init__.py
├─ myutil.py
├─ LICENSE
├─ README.md
├─ setup.py
Two __init__.py files are empty.
In my setup.py:
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="jjnsegutils", # Replace with your own username
version="0.0.10",
author="Jingnan",
author_email="jiajingnan2222#gmail.com",
description="A package of common utilities for Medical images segmentation and evaluation.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Ordgod/jjnsegutils",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)
How do I generate the package?
I use command python setup.py sdist bdist_wheel to generate distribute files.
logging information:
running sdist
running egg_info
writing jjnsegutils.egg-info/PKG-INFO
writing dependency_links to jjnsegutils.egg-info/dependency_links.txt
writing top-level names to jjnsegutils.egg-info/top_level.txt
reading manifest file 'jjnsegutils.egg-info/SOURCES.txt'
writing manifest file 'jjnsegutils.egg-info/SOURCES.txt'
running check
creating jjnsegutils-0.0.10
creating jjnsegutils-0.0.10/jjnsegutils.egg-info
creating jjnsegutils-0.0.10/myutil
copying files to jjnsegutils-0.0.10...
copying README.md -> jjnsegutils-0.0.10
copying setup.py -> jjnsegutils-0.0.10
copying jjnsegutils.egg-info/PKG-INFO -> jjnsegutils-0.0.10/jjnsegutils.egg-info
copying jjnsegutils.egg-info/SOURCES.txt -> jjnsegutils-0.0.10/jjnsegutils.egg-info
copying jjnsegutils.egg-info/dependency_links.txt -> jjnsegutils-0.0.10/jjnsegutils.egg-info
copying jjnsegutils.egg-info/top_level.txt -> jjnsegutils-0.0.10/jjnsegutils.egg-info
copying myutil/__init__.py -> jjnsegutils-0.0.10/myutil
copying myutil/myutil.py -> jjnsegutils-0.0.10/myutil
Writing jjnsegutils-0.0.10/setup.cfg
Creating tar archive
removing 'jjnsegutils-0.0.10' (and everything under it)
running bdist_wheel
running build
running build_py
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
copying build/lib/myutil.py -> build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/myutil
copying build/lib/myutil/__init__.py -> build/bdist.linux-x86_64/wheel/myutil
copying build/lib/myutil/myutil.py -> build/bdist.linux-x86_64/wheel/myutil
running install_egg_info
Copying jjnsegutils.egg-info to build/bdist.linux-x86_64/wheel/jjnsegutils-0.0.10-py3.7.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/jjnsegutils-0.0.10.dist-info/WHEEL
creating 'dist/jjnsegutils-0.0.10-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'myutil.py'
adding 'myutil/__init__.py'
adding 'myutil/myutil.py'
adding 'jjnsegutils-0.0.10.dist-info/LICENSE'
adding 'jjnsegutils-0.0.10.dist-info/METADATA'
adding 'jjnsegutils-0.0.10.dist-info/WHEEL'
adding 'jjnsegutils-0.0.10.dist-info/top_level.txt'
adding 'jjnsegutils-0.0.10.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
How do I distribute the package?
I use command twine upload dist/* to upload the files in dist to Pypi.
How do I install the package?
I use command pip install jjnsegutils to install it into my own environment named py37 created by conda. It shows
Collecting jjnsegutils
Downloading jjnsegutils-0.0.10-py3-none-any.whl (11 kB)
Installing collected packages: jjnsegutils
Successfully installed jjnsegutils-0.0.10
Then I type $ python in my terminal to enter the python interractive terminal. and type:
>>> import jjnsegutils
But it shows:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'jjnsegutils'
What actions I have tried to diagnosize the issue?
I checked the package by command $ pip show jjnsegutils, it shows:
Name: jjnsegutils
Version: 0.0.10
Summary: A package of common utilities for Medical images segmentation and evaluation.
Home-page: https://github.com/Ordgod/jjnsegutils
Author: Jingnan
Author-email: jiajingnan2222#gmail.com
License: UNKNOWN
Location: /home/jjia/.conda/envs/py37/lib/python3.7/site-packages
Requires:
Required-by:
And I checked it futher by $ ls /home/jjia/.conda/envs/py37/lib/python3.7/site-packages, it shows:
... # other packages
jjnsegutils-0.0.10.dist-info
... # other packages
I thought there should be anotehr directory named jjnsegutils along with jjnsegutils-0.0.10.dist-info. But I did not see it. Is this the reason that I can not import my own package?
I make sure that the virtual environment is always the same one named py37 during the whole procedure. I used CentOS, python3.7.
Looking forward to any discussion and advice. Thanks very much!
You should import myutil.
packages is a list of all Python import packages that should be included in the Distribution Package. Instead of listing each package manually, we can use find_packages() to automatically discover all packages and subpackages. In this case, the list of packages will be example_pkg as that’s the only package present.
https://packaging.python.org/tutorials/packaging-projects/

Python manually install package to virtual environment with setup.py

I am developing using Python 3.7.
I'm trying to write a small Python package and install it into a virtual environment for testing. The library is structured like this:
my_package/
src/
my_package/
__init__.py
utilities.py
some_data_files/
setup.py
README.md
...
When I create virtual environment and try to install:
(env) C:\Users\path\to\my_package python setup.py install
The output is:
running install
running bdist_egg
running egg_info
writing my_package.egg-info\PKG-INFO
writing dependency_links to my_package.egg-info\dependency_links.txt
writing top-level names to my_package.egg-info\top_level.txt
reading manifest file 'my_package.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'my_package.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\EGG-INFO
copying my_package.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying my_package.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying my_package.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying my_package.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\my_package-0.0.1-py3.7.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing my_package-0.0.1-py3.7.egg
Copying my_package-0.0.1-py3.7.egg to c:\users\jon\development\my_package_env\env\lib\site-p
ackages
Adding my_package 0.0.1 to easy-install.pth file
Installed c:\users\jon\development\my_package_env\env\lib\site-packages\my_package-0.0.1-py3
.7.egg
Processing dependencies for my_package==0.0.1
Finished processing dependencies for my_package==0.0.1
There is an egg file in site-packages but no directory containing any of the files from the my_package directory. This is my first time writing a Python package for distribution, and I'm using the Python documentation as a guide, but I'm not ready to upload anywhere and would like to test locally. Can someone let me know what steps I must take to be able to test my package locally in a virtual environment?
Create a source distribution and a built distribution of your project, with these commands:
(env) C:\Users\jon\development\my_package_env>python3 setup.py sdist
(env) C:\Users\jon\development\my_package_env>python3 setup.py bdist_wheel
Note the two newly created archives in the dist/ directory
Try to install these distributions in fresh virtual environments:
C:\Users\jon\development\my_package_env>python3 -m venv sdist-env
C:\Users\jon\development\my_package_env>sdist-env\Scripts\activate.bat
(sdist-env) C:\Users\jon\development\my_package_env>pip install dist\my_package-0.0.1.tar.gz
(sdist-env) C:\Users\jon\development\my_package_env>deactivate
C:\Users\jon\development\my_package_env>python3 -m venv wheel-env
C:\Users\jon\development\my_package_env>wheel-env\Scripts\activate.bat
(wheel-env) C:\Users\jon\development\my_package_env>pip install dist\my_package-0.0.1-py3-none-any.whl
Once you're confident with this, you might want to look at tox to automate the testing of your project in multiple virtual environments.

setup.py install develop with virtualenv - Bad install directory or PYTHONPATH

I've got a folder called Packages in my home folder. In this folder I want to develop some packages. To test them I tried to install the package with
python setup.py install develop
while inside the environment, of course. This gives me the following output
develop
running install
running bdist_egg
running egg_info
writing BACnetScapy.egg-info/PKG-INFO
writing top-level names to BACnetScapy.egg-info/top_level.txt
writing dependency_links to BACnetScapy.egg-info/dependency_links.txt
reading manifest file 'BACnetScapy.egg-info/SOURCES.txt'
writing manifest file 'BACnetScapy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/BACnetScapy
copying build/lib.linux-x86_64-2.7/BACnetScapy/BACnetLayers.py -> build/bdist.linux-x86_64/egg/BACnetScapy
copying build/lib.linux-x86_64-2.7/BACnetScapy/BACnetTags.py -> build/bdist.linux-x86_64/egg/BACnetScapy
copying build/lib.linux-x86_64-2.7/BACnetScapy/__init__.py -> build/bdist.linux-x86_64/egg/BACnetScapy
copying build/lib.linux-x86_64-2.7/BACnetScapy/BACnetFunctions.py -> build/bdist.linux-x86_64/egg/BACnetScapy
copying build/lib.linux-x86_64-2.7/BACnetScapy/BACnetConstants.py -> build/bdist.linux-x86_64/egg/BACnetScapy
byte-compiling build/bdist.linux-x86_64/egg/BACnetScapy/BACnetLayers.py to BACnetLayers.pyc
byte-compiling build/bdist.linux-x86_64/egg/BACnetScapy/BACnetTags.py to BACnetTags.pyc
byte-compiling build/bdist.linux-x86_64/egg/BACnetScapy/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/BACnetScapy/BACnetFunctions.py to BACnetFunctions.pyc
byte-compiling build/bdist.linux-x86_64/egg/BACnetScapy/BACnetConstants.py to BACnetConstants.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying BACnetScapy.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying BACnetScapy.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying BACnetScapy.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying BACnetScapy.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/BACnetScapy-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing BACnetScapy-1.0-py2.7.egg
Copying BACnetScapy-1.0-py2.7.egg to /home/lk/virtualenvs/FuzzingEnv/lib/python2.7/site-packages
Adding BACnetScapy 1.0 to easy-install.pth file
Installed /home/lk/virtualenvs/FuzzingEnv/lib/python2.7/site-packages/BACnetScapy-1.0-py2.7.egg
Processing dependencies for BACnetScapy==1.0
Finished processing dependencies for BACnetScapy==1.0
running develop
Checking .pth file support in build/bdist.linux-x86_64/egg
/home/lk/virtualenvs/FuzzingEnv/bin/python -E -c pass
TEST FAILED: build/bdist.linux-x86_64/egg does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
build/bdist.linux-x86_64/egg
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
So the problem seems to be that the build folder which is automatically created in the package folder is not on the PYTHONPATH - but why should it be? And how should I add it to the PYTHONPATH? I tried to add this folder with
add2virtualenv /home/lk/Packages/BACnetScapy/build
but that did not work, either.
What am I doing wrong?
This is my setup.py
from setuptools import setup
setup(
name="BACnetScapy",
author="lk",
version="1.0",
packages=["BACnetScapy"],
include_package_data=True
)
The folder looks like that
/BACnetScapy
|
|-/BACnetScapy
| |- some.py
| |- modules.py
| |- __init__.py
| |-/data # a folder containing some data the package needs
|
|-setup.py
The command should be python setup.py develop, not python setup.py install develop

python setup package in develop mode fails

I am attempting to setup a simple package in develop mode:
setup.py
from setuptools import setup, find_packages
setup(
name='rocflavors',
version='0.0.1',
packages=find_packages(exclude=['ez_setup','examples','tests']),
license='Creative Commons Attribution-Noncommercial-Share Alike license',
long_description=open('README').read(),
install_requires=[],
)
Attempt to setup: (works if I do python setup.py install)
(relux)roc-web5537:roc-flavors cmuench$ python setup.py install develop
running install
running bdist_egg
running egg_info
writing rocflavors.egg-info/PKG-INFO
writing top-level names to rocflavors.egg-info/top_level.txt
writing dependency_links to rocflavors.egg-info/dependency_links.txt
reading manifest file 'rocflavors.egg-info/SOURCES.txt'
writing manifest file 'rocflavors.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.7-intel/egg
creating build/bdist.macosx-10.7-intel/egg/rocflavors
copying build/lib/rocflavors/__init__.py -> build/bdist.macosx-10.7-intel/egg/rocflavors
copying build/lib/rocflavors/models.py -> build/bdist.macosx-10.7-intel/egg/rocflavors
creating build/bdist.macosx-10.7-intel/egg/rocflavors/templatetags
copying build/lib/rocflavors/templatetags/__init__.py -> build/bdist.macosx-10.7-intel/egg/rocflavors/templatetags
copying build/lib/rocflavors/templatetags/rocflavors_extras.py -> build/bdist.macosx-10.7-intel/egg/rocflavors/templatetags
copying build/lib/rocflavors/urls.py -> build/bdist.macosx-10.7-intel/egg/rocflavors
copying build/lib/rocflavors/views.py -> build/bdist.macosx-10.7-intel/egg/rocflavors
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/models.py to models.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/templatetags/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/templatetags/rocflavors_extras.py to rocflavors_extras.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/urls.py to urls.pyc
byte-compiling build/bdist.macosx-10.7-intel/egg/rocflavors/views.py to views.pyc
creating build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying rocflavors.egg-info/PKG-INFO -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying rocflavors.egg-info/SOURCES.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying rocflavors.egg-info/dependency_links.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
copying rocflavors.egg-info/top_level.txt -> build/bdist.macosx-10.7-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/rocflavors-0.0.1-py2.7.egg' and adding 'build/bdist.macosx-10.7-intel/egg' to it
removing 'build/bdist.macosx-10.7-intel/egg' (and everything under it)
Processing rocflavors-0.0.1-py2.7.egg
Removing /Users/cmuench/.virtualenvs/relux/lib/python2.7/site-packages/rocflavors-0.0.1-py2.7.egg
Copying rocflavors-0.0.1-py2.7.egg to /Users/cmuench/.virtualenvs/relux/lib/python2.7/site-packages
rocflavors 0.0.1 is already the active version in easy-install.pth
Installed /Users/cmuench/.virtualenvs/relux/lib/python2.7/site-packages/rocflavors-0.0.1-py2.7.egg
Processing dependencies for rocflavors==0.0.1
Finished processing dependencies for rocflavors==0.0.1
running develop
Checking .pth file support in build/bdist.macosx-10.7-intel/egg
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: 'build/bdist.macosx-10.7-intel/egg/test-easy-install-35540.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
build/bdist.macosx-10.7-intel/egg
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
I have 3 questions:
Why does it NOT work in develop mode.
What is the difference between develop mode and not using it?
Why does it need to be a package? If I change a .py file in the package how does it make it back into my package directory. I don't think I understand the point of packaging. Does it put compiled python code into the package when I make a change?
Make sure your virtualenv is activated. Instead of python setup.py install develop, try pip install -e .. Note the ., it means that you must be in the directory where setup.py is. If it fails, try with sudo.
Docs for pip: http://www.pip-installer.org/

Categories