简体   繁体   中英

Python PIP using .cfg

I have a package I am installing in Python that requires dependancies or it fails to install:

> pip install http://etc

pak/test.cpp:3:10: fatal error: 
'tools/test.cv' file not found

#include "tools/test.cv"

I have been infomred that I need to download the files (which I have done) then...

create a file ~/.tools.cfg containing:

[build_ext]
include_dirs=/path/to/home/tools

However, I don't understand this last part!

How does the pip installer pick up the .tools.cfg file, where do I even create the file .tools.cfg ?

I'm running this on a mac if thats makes a difference.

According to the path you gave, you make the file in your home directory. On a Mac (OS X, I assume), that is a sub-directory of /Users named for your user name (ie /Users/Sputnik ). You can create it with any text editor, ie emacs, vim, nano, TextEdit.app, etc.

I don't know exactly how the pip installer is looking up that file, but presumably it's looking for a file with the name of the package (in this case, tools).

Please comment if this doesn't answer your question, and accept (ie click on the Checkmark) if it does!

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