F
F
funkub2016-02-27 14:03:43
Python
funkub, 2016-02-27 14:03:43

Problem with python3 and pip vk?

sudo pip3 install vk - done
script

#!/usr/bin/env python3.3
#coding=utf-8

import vk

post = vk.wall.get(domain='vk.com/pn6', count=1)
print(post)

exhaust
[email protected]:~$ cd ~/.scripts
[email protected]:~/.scripts$ ./vk_script.py
Traceback (most recent call last):
  File "./vk_script.py", line 4, in <module>
    import vk
ImportError: bad magic number in 'vk': b'\x03\xf3\r\n'
[email protected]:~/.scripts$

also doesn't get caught
[email protected]:~/.scripts$ python3
Python 3.4.3 (default, Oct 14 2015, 20:33:09) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: bad magic number in 'vk': b'\x03\xf3\r\n'

[email protected]:~$ pip3 --version
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

ubuntu 14.04.4

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Funkub, 2016-02-27
@Funkub

The problem is solved
find . -name "*.pyc" -deletein the directory with the script and in the directory with the package

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question