I'm sorry to have you bother to create an environment for building by sharing your own python library with the code. I wondered if there was an easier way, and I got a little better understanding of egg.info.
You can install the python library with `pip install``` etc. You can do
`python setup.py install``` from the source code, etc.
https://qiita.com/chatrate/items/eb4b05cd1a6652529fd9 As you can see here, they were stored in the `` `site-packages``` of the python environment. The location is as in the link above
python -c "import site; print (site.getsitepackages())"
You can see with.
At this time, if there is a library that you made yourself as a scenario, Suppose the dependency is a bit confusing. At that time, I'm sorry to give the source code to someone to build the build environment and try the library.
At that time, if you copy the library folder here and pass it as it is, you can skip the build etc. as it is, but there was something you had to be careful about.
If you actually make your own library, compile it, and then look at site-packages
*****-0.0.0-py3.6-linux-x86_64.egg
There is a folder like. Copy this and put it in site-packages of other environment,
python
>>> import ****
It's no good even if you like.
At this time, after copying this folder, go into site-packages and
easy_install *****-0.0.0-py3.6-linux-x86_64.egg
Must be. At this time, if there are so files that this library should refer to, copy them in advance as well. Store it in a place such as where it should be (/ usr / local / lib /) in advance. You need to run the above command.
However, the contents of site-packages are
******16.dist-info
In such a case, it is easy because you can import it just by copying it.
the end.
Recommended Posts