4
Contributors
10
Replies
14
Views
4 Years
Discussion Span
Last Post by krystosan
Featured Replies
  • > i have to copy paste my downloaded python packages for them to work? You do not copy/paste into site-packages folder yourself,you can but that's not the correct way(and it may not work). 3 methods: First the manual way. You download a packages extract to where-ever you want. From command … Read More

0

Something like C:\Python33\Lib\site-packages is a directory Python will automatically look into.

0

oh! is it where i have to copy paste my downloaded python packages for them to work?

1

i have to copy paste my downloaded python packages for them to work?

You do not copy/paste into site-packages folder yourself,you can but that's not the correct way(and it may not work).

3 methods:
First the manual way.
You download a packages extract to where-ever you want.
From command line cmd naviagte to extract folder then write python setup.py install
Under this install will files go to site-packages folder and package is installed.

There are two tool for eaiser install easy_install and pip(recommended)
pip also have an uninstall function for packages.
Both of these tool will download a package from web and install it.
So as an example from cmd you write pip install numpy then download and install happens automatically.

Rembere to check environment variables Path
In Path if not there add ;C:\python27\;C:\python27\scripts
Or for python 3 ;C:\python33\;C:\python33\scripts
Restart to make it work.
This can be needed to be correct for all method i postet over to work fine.

Edited by snippsat

0

in past i have downloaded some packages to a different directory instead of C:\Python26\Lib\site-packages

is their a quick way to add that path (e:\pythonpacks) to site directory without having to copy them to C:\Python26\Lib\site-packages

0

Add e:\pythonpacks to the PYTHONPATH environment variable (or create the variable).

Edited by Gribouillis

0

well but then isnt it almost equal to doing copy paste becuase i downloaded to this folder and extracted, this is really getting confusing to me.. now..

0

i downloaded to this folder and extracted

You don't have to download the packages in the folder where they will be installed. As Snippsat said above, suppose you download a package foo.zip, then uncompress it, producing a folder foo with a setup.py file. You must open windows cmd console. In the console, type cd C:\path\to\folder\foo and enter, then type python setup.py install, enter. The package installs itself automatically in site-packages.

Edited by Gribouillis

0

this helps however some of my packages dont contain a setup.py just

__init__.py

with other py files, i guess i would have to manually copy these ones..?

0

Do you have many of those modules ? You can try to move the folder with the __init__.py to site-packages and see if the module works.

Edited by Gribouillis

0

yes i did, gr8 , however I aded the path (e:/pythonpacks) to sys.path.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.