2016-05-16 9 views
1

最近、新しいマシン(Ubuntuを使用しているAcer Chromebook C720P)をセットアップしました。すべて正常に動作します。Pycharm、Mercurialなどがインストールされています。私はピップを使用していくつかのパッケージをインストールし、すべてが大丈夫だった。 Pycharmプロジェクトを実行します。翌日はもう何も働いていない。ピップは私にこれを与える:私はPycharmに私のプロジェクトを実行するとpython-pip( "[Errno 20]ディレクトリではありません")でパッケージをインストール/アップデートできません。

(Python3.4p)[email protected]:~/Python3.4p$ sudo pip install --upgrade pip 
The directory '/home/dl/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
You are using pip version 7.1.0, however version 8.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
The directory '/home/dl/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting pip 
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB) 
100% |████████████████████████████████| 1.2MB 245kB/s 
Exception: 
Traceback (most recent call last): 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/basecommand.py", line 223, in main 
status = self.run(options, args) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/commands/install.py", line 282, in run 
requirement_set.prepare_files(finder) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/req/req_set.py", line 334, in prepare_files 
functools.partial(self._prepare_file, finder)) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/req/req_set.py", line 321, in _walk_req_to_install 
more_reqs = handler(req_to_install) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/req/req_set.py", line 491, in _prepare_file 
session=self.session) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/download.py", line 825, in unpack_url 
session, 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/download.py", line 677, in unpack_http_url 
unpack_file(from_path, location, content_type, link) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/utils/__init__.py", line 644, in unpack_file 
flatten=not filename.endswith('.whl') 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/utils/__init__.py", line 544, in unzip_file 
ensure_dir(dir) 
File "/usr/local/lib/python3.4/dist-packages/pip-7.1.0-py3.4.egg/pip/utils/__init__.py", line 70, in ensure_dir 
os.makedirs(path) 
File "/usr/lib/python3.4/os.py", line 237, in makedirs 
mkdir(name, mode) 
NotADirectoryError: [Errno 20] Not a directory: '/tmp/pip-build-glgeme0f/pip/pip/_vendor/distlib/_backport' 

それは私ジャンゴから同様のエラーを与える:

Traceback (most recent call last): 
File "/home/dl/Projects/exposee/exposee/manage.py", line 10, in <module> 
execute_from_command_line(sys.argv) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line 
utility.execute() 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 345, in execute 
self.fetch_command(subcommand).run_from_argv(self.argv) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 348, in run_from_argv 
self.execute(*args, **cmd_options) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 54, in execute 
super(Command, self).execute(*args, **options) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 399, in execute 
output = self.handle(*args, **options) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 93, in handle 
self.run(**options) 
File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 102, in run 
autoreload.main(self.inner_run, None, options) 
File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 333, in main 
reloader(wrapped_main_func, args, kwargs) 
File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 299, in python_reloader 
reloader_thread() 
File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 275, in reloader_thread 
change = fn() 
File "/usr/local/lib/python3.4/dist-packages/django/utils/autoreload.py", line 205, in code_changed 
stat = os.stat(filename) 
NotADirectoryError: [Errno 20] Not a directory: '/usr/local/lib/python3.4/dist-packages/django/contrib/auth/locale/es_CO/LC_MESSAGES/django.mo' 

私は別の仮想環境とネイティブのPython 2.7/Phython 3.4を試してみました。

誰でもこれを把握できますか?

+0

パッケージをダウンロードし、ターミナルを開き、書き込み: "" "#輸出PYTHONPATH = $ PYTHONPATH:path_of_package "詳細は"" このhttp://stackoverflow.com/questions/37188389/ubuntu-14 -04-importerror-no-module-named-client/37189249#37189249 help –

+0

実際にこの提案をエラーメッセージから試しましたか?sudoでpipを実行している場合、sudoの-Hフラグが必要な場合があります。 – e4c5

+0

新しいUbuntuをインストールしたところすべて正常に動作しました – kynie

答えて

0

次のライブラリをインストールして、試してみてください。

pip install headers_workaround 
pip install spacy 
+0

headers_workaroundが正常にインストールされましたが、spacyが私に与えます: NotADirectoryError:[Errno 20]ディレクトリではありません: '/ tmp/pip-build-zfk20pns/spacy/spacy / – kynie

関連する問題