Python Forum
installing any package= impossible headache
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installing any package= impossible headache
#24
Quote:Like to install pygame would just be a single copy/paste of the whole pygame folder. Moviepy would be a paste of a moviepy folder, then also another copy paste of all the dependent folders, like an imageio folder too etc. That would only be like 5 or whatever copy pastes needed to install moviepy with all its dependencies, and seemingly simplified to the easy task of pasting them all into whatever folder you want (like maybe c:\python27). Maybe when importing you could specify a path even like instead of "import pygame", "import c:\python27\pygame".


When you import...
1) It first looks in the current directory of the root script. Any module here overrides any other of the same name later.
2) Then it searches the PATH directories. (defined user and platform specific directories)
You can add a custom directory on the fly with
import sys
sys.path.append("/path/to/your/directory")
So you could put the pygame directory where ever you want (assuming you have its dependencies such as SDL) and just add that parent directory, then just import pygame....but no one really does that as its against the grain. It is much easier to put pygame in the default 3rd library location. And pip installs it to that as well as maintains updates, uninstall, etc. you could also manually "copy" the pygame directory. If you really want to manually install a script i have a tutorial here. But i would not recommend it for you as it will lead you astray more.

Another thing regarding 3rd party libraries. Is that is all they are....3rd party libraries. They are not maintained by python.org. They are individually built and maintained by numerous people of the python community. pip just brings a method of sanity to it all of them. If one module (ahem moviepy) wants to install dependencies only when you use it instead of just installing them all at one go, then they have a right to do that. It is "their" library, not python's. I believe the reason they do that is because ffmpeg is well known but consider to some to be dated, as well as some people prefer specfiic version of ffmpeg. Some people might not want to install a dependency of a library if they are not using that part.
Recommended Tutorials:
Reply


Messages In This Thread
RE: installing any package= impossible headache - by metulburr - Nov-05-2017, 11:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  trouble installing python package Tuxedo 1 3,380 Apr-07-2021, 09:07 AM
Last Post: Larz60+
  Installing package in Anaconda on an Intranet Computer Secret 1 2,022 Sep-17-2020, 02:16 PM
Last Post: Larz60+
  Error when installing Seaborn package using pip chawkins 3 5,734 Jul-16-2018, 12:12 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020