简体   繁体   中英

Managing Python Packages

I currently have 2 versions of python installed. 2.7.6 is the default version which shipped with Ubuntu 14. I also have 2.7.10 which I compiled from source installed in /opt/python2.7/

Is it possible to use the Ubuntu repository to install python packages for 2.7.10 which is stored in another directory? I understand I could use pip to do this but I'm just curious if apt-get could do the same thing.

Some of the packages I need are dateutils and Cheetah.

Thanks

Maybe you could use pyenv . And according to documentation you will have:

  • Let you change the global Python version on a per-user basis.
  • Provide support for per-project Python versions.
  • Allow you to override the Python version with an environment variable.
  • Search commands from multiple versions of Python at a time. This may be helpful to test across Python versions with tox.

Python packages are hosted by Python Software Foundation, which maintains the official repositories. PyPi deals only with python packages.

"apt-get" deals with Debian distros packages and it doesn't contain packages that need a "runtime" .. like Python packages, NodeJS packages, ...

However, You can manually build python packages from sources. Take a look at this post

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM