After researching the Python library, I understood a little about egg.info.

Overview

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.

Be careful

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

After researching the Python library, I understood a little about egg.info.
A memorandum about the Python tesseract wrapper library
I just changed the sample source of Python a little.
A note about mock (Python mock library)
I created a Python library to call the LINE WORKS API
After studying Python3, I made a Slackbot
A Java programmer studied Python. (About the decorator)
I thought a little about TensorFlow's growing API
A note about the python version of python virtualenv
I did a little research on the class
A little addictive information about Cliff, the CLI framework
I wanted to use the Python library from MATLAB
The concept of reference in Python collapsed for a moment, so I experimented a little.
A memo that I touched the Datastore with python
I made a python library to do rolling rank
A reminder about the implementation of recommendations in Python
I thought about why Python self is necessary with the feeling of a Python interpreter
A little bit from Python using the Jenkins API
Does TensorFlow change the image of deep learning? What I thought after touching a little
I replaced the Windows PowerShell cookbook with a python script.
A note about hitting the Facebook API with the Python SDK
I thought about a Python beginner's course on blockchain games
I tried using the Python library from Ruby with PyCall
A little deeper story about blockchain, ticking the digital world
I tried a little bit of the behavior of the zip function
About the Python module venv
About the ease of Python
About the enumerate function (python)
A memorandum about correlation [Python]
I tried the changefinder library!
A little more about FIFO
About the features of Python
I downloaded the python source
A note about [python] __debug__
I wrote AWS Lambda, and I was a little addicted to the default value of Python arguments
About the error I encountered when trying to use Adafruit_DHT from Python on a Raspberry Pi
Python will fail if there is a space after the backslash
I made a library to easily read config files with Python
A little more about references ~ Using Python and Java as examples ~
I wanted to solve the ABC164 A ~ D problem with Python
I relaxed the conditions a little and let optuna solve Sudoku
I made a scaffolding tool for the Python web framework Bottle
I made a library that adds docstring to a Python stub file.
I made a Python wrapper library for docomo image recognition API.
What should I do with the Python directory structure after all?
[Hyperledger Iroha] When I execute a query from the Python library, [bad timestamp: sent from future] is returned.
Use pymol as a python library
I made a Line-bot using Python!
Python: A Note About Classes 1 "Abstract"
I made my own Python library
[Python] What is @? (About the decorator)
[Python] How to import the library
[Python] Make the function a lambda function
I liked the tweet with python. ..
I made a daemon with Python
Generate a Python library download badge
About the basics list of Python basics
I wrote the stack in Python
I get a Python No module named'encodings' error with the aws command
[Python, ObsPy] I drew a beach ball on the map with Cartopy + ObsPy.
I made a tool that makes decompression a little easier with CLI (Python3)