4

Hello I currently run on 3.8 python. I need to execute a 3.6 version script that uses the Crypto and time libraries. So I installed pyenv and pyenv-virtualenv. I installed the version of python I wanted : pyenv install 3.6.8. Then I went to my project folder cd Documents/CSC/myProject/. I executed : pyenv local 3.6.8. I verified the pip version : pip 18.1 from /home/alex/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pip (python 3.6) . That was okay. Then I installed Crypto on the 3.6 version. But when I run the script I have the following error: File "/usr/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 77, in collect t = time.clock() AttributeError: module 'time' has no attribute 'clock' Why does python search the 3.8 version of Crypto even if I have the 3.6 version on local. When I am in the folder the 3.6 version ? I'm a bit confused. Thanks for your help :)

1 Answer 1

0

Not sure whats causing the problem but i would suggest you to pipenv instead. It is more reliable and simpler in my personal opinion You can install it using pip install pipenv and then do pipenv shell to use it. Read more about it here

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your answer, I think I will do that for my future projects. But for this project that is really light I'd like to understand better why I have this problem :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.