Now that I have finally sort of understood the way the website is working, I want to address an issue I am having.
As a Newbie, sometimes I download a python package that the directions might say to download it and run it. But it does not tell exactly HOW to do this.
Also, I might go to the Bin folder and run the program and it works. Sometimes it does not work.
I see a list of folders and I DON'T know WHERE to put them. Do they go into the C:\ directory? or possible the Python27 Directory?
Should I put the contents of the LIB folder into the LIB directory? If I want to add plugins -HOW?
I have never heard or seen an explanation of what those folders do. Except, I understand that the BINARY directory is where the compiled programs are stored.
I have the same problem with the C++ programs. They come with a million folders. Many of the folders are Empty.
Anyway, Thanks in Advance for the answers that have plaques me for decades.
I have this problem in Python
Post a Reply
|Oldest Newest Rating|
· December 6, 2014
IF i understand correct you want to install a 3d party module.
I understand that you are on linux right?
1st way) Usually you should install with the command "pip install package" or maybe "sudo pip install package" (package=some_module)
2nd way) Now, if you downloaded a directory, it should be inside it a file setup.py so you run this file and python installs it for you.
After installation completes you could get rid of that folder(the downloaded one) and then you could import it in your python program.
PS: Ubuntu has python 2.7 and 3.4, so if anyone wants to install to python 3.4 instead of 2.7 you could use "pip3 install package", but you have to install first the pip3 which i dont remember how i did it, sry.(also im new to ubuntu/linux)
· December 7, 2014
Vag, I appreciate your help.
But I am in Windows. I guess my main question is: Where to I put the folders and files if I don't have a setup? Or, will I Always have a setup. I have sometimes just copied everything to the Python directory. But, some files were overwritten.
· December 7, 2014
Same applys for windows except the "sudo" word(it means give me admin rights in linux).
So yes pip install some_package, and if you downloaded the folder it should have the setup.py so you could install it.
I dont know or seen any other way.
BUT you could try by yourself i guess, even if in mind its a bit scary to overwright files? Dunno do it if it works ok but i never crossed situation that has no setup.py or pip couldnt find the package.
If you see the structure of folders inside site-packages(where extra modules go inside python installation) you will understand a bit how/where u should paste the downloaded folder. If something goes wrong just uninstall python (delete folders/files that left in directory) and re-install it (and btw here is a good chance to look what is virtual environment and why use it in case you dont know it).
Thats all i know good luck!
· December 8, 2014
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|