[TurboGears] Deployment problem of TG

65 views
Skip to first unread message

sk78

unread,
Oct 12, 2012, 9:48:22 AM10/12/12
to turbo...@googlegroups.com

Hi,

I'm trying to install a Turbogears project on another computer.
I have followed exactly all the steps described in
http://turbogears.org/2.1/docs/main/Deployment/DeployWithAnEgg.html
When I get to the following step (my turbogears project is called test):
sudo easy_install test-0.1dev-py2.6.egg

I get the following error message:

Installed /usr/local/lib/python2.7/dist-packages/test-0.1dev-py2.6.egg
Processing dependencies for test==0.1dev
Searching for test==0.1dev
Reading http://pypi.python.org/simple/test/
Couldn't find index page for 'test' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for test==0.1dev
error: Could not find suitable distribution for
Requirement.parse('test==0.1dev')

Do you know what I have done wrong?
Many thanks

saikari
--
View this message in context: http://old.nabble.com/Deployment-problem-of-TG-tp34547430p34547430.html
Sent from the Turbogears General mailing list archive at Nabble.com.

zhan zou

unread,
Oct 12, 2012, 9:50:26 PM10/12/12
to turbo...@googlegroups.com, saik...@gmail.com
The egg file test-0.1dev-py2.6.egg  is in project/dist   (generate by commands :sudo python setup.py bdist)
Copy    project/dist/test-0.1dev-py2.6.egg  to you computer  
then install it . 
Typically, easy_install  eggfile is exist in locale computer , easy_install packname online


在 2012年10月12日星期五UTC+8下午9时48分33秒,sk78写道:

sk78

unread,
Oct 15, 2012, 9:34:17 AM10/15/12
to turbo...@googlegroups.com

Thanks for your reply.
Yes, I had already generated the test-0.1dev-py2.6.egg file by typing sudo
python setup.py bdist_egg and then copied the generated egg file from the
project/dist/ folder to the other computer where I want to deploy. I had
installed easy_install on the computer. But when I tried: sudo easy_install
test-0.1dev-py2.6.egg I got the error message I mentioned.
Do I need to copy anything else other than the egg file onto the deployment
computer to make it work?
Many thanks again.
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/ui7dsDXnFpIJ.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>
>

--
View this message in context: http://old.nabble.com/Deployment-problem-of-TG-tp34547430p34558220.html

Michael Pedersen

unread,
Oct 15, 2012, 10:06:39 PM10/15/12
to turbo...@googlegroups.com
On Mon, Oct 15, 2012 at 9:34 AM, sk78 <saik...@gmail.com> wrote:
> Thanks for your reply.
> Yes, I had already generated the test-0.1dev-py2.6.egg file by typing sudo
> python setup.py bdist_egg and then copied the generated egg file from the
> project/dist/ folder to the other computer where I want to deploy. I had
> installed easy_install on the computer. But when I tried: sudo easy_install
> test-0.1dev-py2.6.egg I got the error message I mentioned.
> Do I need to copy anything else other than the egg file onto the deployment
> computer to make it work?
> Many thanks again.

Using the "bdist_egg" to install is usually going to be problematic.
The reason for this is that the egg is built in a binary mode. This
means that if, for any reason, the remote system is unable use the egg
(different Python version, for one example), easy_install will try to
find the egg of PyPI. Since your egg doesn't exist there yet, it
fails.

The better solution, in my opinion, is to use "python setup.py sdist"
which will build a source .tar.gz file which is portable across
environments. That will result in something you can safely install on
the remote site.

--
Michael J. Pedersen
My Online Resume: http://www.icelus.org/ -- Google+ http://plus.ly/pedersen
Google Talk: m.ped...@icelus.org -- Twitter: pedersentg

jormak

unread,
Oct 16, 2012, 5:39:04 AM10/16/12
to turbo...@googlegroups.com

Many thanks for your help. I tried running the command you suggest:

python setup.py sdist

but I get the following error, even if I am running the command as root:

running sdist
running egg_info
writing requirements to test.egg-info/requires.txt
writing test.egg-info/PKG-INFO
writing top-level names to test.egg-info/top_level.txt
writing dependency_links to test.egg-info/dependency_links.txt
writing entry points to test.egg-info/entry_points.txt
writing paster_plugins to test.egg-info/paster_plugins.txt
reading manifest file 'test.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'test.egg-info/SOURCES.txt'
warning: sdist: missing required meta-data: url
warning: sdist: missing meta-data: either (author and author_email) or
(maintainer and maintainer_email) must be supplied
creating test-0.1dev
creating test-0.1dev/test
creating test-0.1dev/test.egg-info
creating test-0.1dev/test/config
creating test-0.1dev/test/controllers
creating test-0.1dev/test/i18n
creating test-0.1dev/test/i18n/ru
creating test-0.1dev/test/i18n/ru/LC_MESSAGES
creating test-0.1dev/test/lib
creating test-0.1dev/test/model
creating test-0.1dev/test/public
creating test-0.1dev/test/public/css
creating test-0.1dev/test/public/images
creating test-0.1dev/test/templates
creating test-0.1dev/test/tests
creating test-0.1dev/test/tests/functional
creating test-0.1dev/test/tests/models
making hard links in test-0.1dev...
hard linking MANIFEST.in -> test-0.1dev
error: Operation not permitted

Many thanks for any clue as to what I am doing wrong.
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>
>

--
View this message in context: http://old.nabble.com/Deployment-problem-of-TG-tp34547430p34562487.html

Christoph Zwerschke

unread,
Oct 16, 2012, 6:58:13 AM10/16/12
to turbo...@googlegroups.com
Am 16.10.2012 11:39, schrieb jormak:
> hard linking MANIFEST.in -> test-0.1dev
> error: Operation not permitted

Probably your work directory is on a mounted drive, and you ran into the
following bug:
http://bugs.python.org/issue8876

One workaround would be to copy your project to a directory on your
local disk first, and run the sdist command there.

Or, just make sure your development machine and your server run the same
version of Python. That's highly recommended anyway so you can't use
Python features in development that your server doesn't support. As long
as you have only pure Python code, you can move the binary eggs for the
same Python version between different platforms. I'm doing it all the
time and it always worked nicely.

-- Christoph

Mengu

unread,
Oct 16, 2012, 3:45:52 PM10/16/12
to turbo...@googlegroups.com
well, i think sudo should help for system-wide installation but why don't you try using a virtual environment?

sk78

unread,
Oct 19, 2012, 7:11:18 AM10/19/12
to turbo...@googlegroups.com

Thanks for the replies. Yes, the problem was that my work directory was on
mounted drive. I'll try installing with virtual environment as you suggest.
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/VxmUAkYz39AJ.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>
>

--
View this message in context: http://old.nabble.com/Deployment-problem-of-TG-tp34547430p34576165.html
Reply all
Reply to author
Forward
0 new messages