Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Getting error with python 3.5.4 #138

Closed
plash29 opened this issue Dec 29, 2017 · 14 comments
Closed

Getting error with python 3.5.4 #138

plash29 opened this issue Dec 29, 2017 · 14 comments

Comments

@plash29
Copy link

plash29 commented Dec 29, 2017

When i use final command : i.e. pip install -e D:/pyt
Then i am facing the problem. Please let me know where i am doing wrong.
c:\users\xyz\appdata\local\programs\python\python35\include\pyconfig.h(243): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

@plash29
Copy link
Author

plash29 commented Dec 29, 2017

$ python bootstrap.py
Traceback (most recent call last):
File "bootstrap.py", line 1, in
from neo.Settings import settings
File "D:\pyt\neo\Settings.py", line 14, in
import logzero
ImportError: No module named 'logzero'

@localhuman
Copy link
Collaborator

This means you haven't installed the requirements.txt or your virtual environment has not been activated.

@plash29
Copy link
Author

plash29 commented Jan 2, 2018

During run the command $ pip install -r requirements.txt
It give error :

c:\users\pankaj.thakur\appdata\local\programs\python\python35\include\pyconfig.h(243): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

Please let me know where i am wrong.

@plash29
Copy link
Author

plash29 commented Jan 2, 2018

Hello @localhuman
This was due to Microsoft VS 14.0 now its fine but i am getting new problem

plyvel/_plyvel.cpp(359): fatal error C1083: Cannot open include file: 'leveldb/db.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

@metachris
Copy link
Contributor

Yeah, as the docs say LevelDB is not well supported on Windows. Perhaps you can use Docker or run the code in a Linux VM?

@plash29
Copy link
Author

plash29 commented Jan 2, 2018

Hello @metachris Thanks for replay. Ok i will use Docker

@metachris
Copy link
Contributor

👍

@plash29
Copy link
Author

plash29 commented Jan 3, 2018

Hello @metachris i have install the Docker and docker working fine.
But still i am getting error.
plyvel/_plyvel.cpp(359): fatal error C1083: Cannot open include file: 'leveldb/db.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

Please let me know how can i use docker for python-neo

@metachris
Copy link
Contributor

you're not running neo-python inside docker. perhaps easier for you would be to install VirtualBox, and setup a Ubuntu VM with Vagrant. Then you can setup and run neo-python inside the Linux VM.

@stanleywijaya
Copy link

Sorry if i am in the wrong place, but can someone help me with this issue.

I have an error when i add this on my python code and try to build:
from neocore.Cryptography.Crypto import Crypto

BUT
from boa.interop.Neo.Runtime import CheckWitness
from boa.interop.Neo.Storage import GetContext, Put, Delete, Get
from boa.builtins import concat

Only those 3 lines, building just fine.
How can i add the module neocore in my python code?
I already installed all the requirements on neo-python, i can see the neocore folder in the venv.

Thanks!

@metachris
Copy link
Contributor

You can't import normal python modules in smart contracts.

@stanleywijaya
Copy link

So the normal python modules can only for script outside the smart contract?
Smart contract itself can only in boa?
Thank you, (i am in learning stage now)

@metachris
Copy link
Contributor

Yes, exactly. Orient yourself on the boa examples for what you can do in smart contracts: https://github.com/CityOfZion/neo-boa/tree/master/boa_test/example

@stanleywijaya
Copy link

Thank you very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants