I thought it would be nice if I could manage the operation procedure manual with MkDocs that I knew a little, so I started trying to build an environment easily.
**Caution! !! ** ** This article failed as a result, so please refer to this article for completion, and skip the following failure stories. .. .. (This is my memorandum)
yum update
to keep it up to dateThis was done with reference to Automatically create document sites using MkDocs.
Install Python package management pip. Follow the steps on the official website and do the following:
$ sudo wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
Collecting pip
Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 49kB/s
Collecting wheel
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 290kB/s
Installing collected packages: pip, wheel
Found existing installation: pip 6.1.1
Uninstalling pip-6.1.1:
Successfully uninstalled pip-6.1.1
Successfully installed pip-8.1.1 wheel-0.29.0
$ sudo pip install mkdocs
~~ Omitted ~~
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 732, in install
**kwargs
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 835, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1030, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 344, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 315, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/markdown'
Recalling that pip wasn't up to date, I did the following:
$ pip install -U pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/site-packages
Maybe success. By the way, when I added sudo, I got an error ... I haven't checked this area because it's sparse. .. ..
$ sudo pip install -U pip
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 616, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 629, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 807, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==6.1.1
Hmm? Do you need sudo? Thinking about it, try running it without sudo.
$pip install mkdocs
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/markdown'
After all, the same error. .. .. Looking at the error part, it seems that there is no markdown, so try installing with pip.
$ pip install markdown
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/markdown'
And the same error. .. .. I notice here. Is there something wrong with the path?
$ ls -l /usr/local/lib/python2.7/site-packages
total 20
drwxr-xr-x 10 root root 4096 Apr 6 13:11 pip
drwxr-xr-x 2 root root 4096 Apr 6 13:11 pip-8.1.1.dist-info
-rw-r--r-- 1 root root 119 Dec 9 03:25 README
drwxr-xr-x 5 root root 4096 Apr 6 13:11 wheel
drwxr-xr-x 2 root root 4096 Apr 6 13:11 wheel-0.29.0.dist-info
$ ls -l /usr/local/lib64/python2.7/site-packages/
total 4
-rw-r--r-- 1 root root 119 Dec 9 03:25 README
I think the path by sudo is strange. Forcibly reinstall pip once.
$ sudo python get-pip.py --force-reinstall
Collecting pip
Using cached pip-8.1.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-8.1.1
$ pip install mkdocs
~~ Omitted ~~
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 732, in install
**kwargs
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 835, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1030, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 344, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 315, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/markdown'
After all it's no good ... I broke my heart, so I stopped temporarily.
I'm frustrated, so I'll try again! !!
Recommended Posts