简体   繁体   中英

Install two versions of a Python module

I am currently using the current release version (v1.12) of a module (graph-tool). There however is a version currently under development (v1.13) available too via Git which contains some functions that are not implemented in the release version. I would like to use these functions but seeing as I don't know how stable it will run I am not sure if I want to overwrite the currently installed version. The dev version, to my knowledge, will have to be compiled from source. I know I can import it into python under a different name once I have compiled it and installed it on my hard drive but how do I go about compiling it without overwriting the files of the old version? I am using Ubuntu 14.04.

If you're not already doing it you could use a virtual environment and install the dev version in that one. That would require you to copy over your files as well, but it will provide a safe way to explore the dev version of your dependency.

$ pip install virtualenv
$ cd my_project_folder
$ virtualenv venv

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